iOS: Fixed several orientation bugs on iPad. Still a lot more bugs to fix.

Related to issue #405.