Implement the new Dispose semantics.

This also means more code can be moved to maccore so that it's shared with MonoTouch.