Move the disposal enqueue into the block where the warning is logged in the finalizer.
Set a flag when the disposal is enqueued and check the flag in Dispose so the native dispose function doesn't get called twice if Dispose is called afterward.
It should be noted that calling Dispose from a finalizer is a very bad idea, but at least it shouldn't crash now!
Resolves #461
Two changes from the reverted patch:
It should be noted that calling Dispose from a finalizer is a very bad idea, but at least it shouldn't crash now!