Fixed crash while resetting.

Engine.BeginDispatchInUIThread now forces a direct dispatch when the
engine is disposing or resetting.
This prevents a disposed UI dispatch pump from trying to restart.