Fixes the bug that MFMailComposeViewController not presented properly.

The get_viewcontroller() function assumed the SDL window is always the first window in the shared application. However, it is not there. This commit assumes the SDL window is the keyWindow of the shared application.

In the mailComposeController:didFinishWithResult:error: method. The code originally uses the same get_viewcontroller() function to dismiss the modal view. However, uses [controller presentingViewController] is more promising to make sure the view controller that presents the MFMailComposeViewController.

There are also errors showed in the log if animation is disabled. So I changed to use animation on both presenting and dismissing. And the errors in log gone.

Signed-off-by: Olli Wang <olliwang@ollix.com>