Reset the device orientation after deactivation on iPads running iOS 5.1 or 7.1. (refs #180)

On iPads running iOS 5.1 or 7.1, `UIDevice` forgets its orientation after deactivation.
This is not only unexpected but can mess with `-[SLElement isVisible]`
which (as of #180) falls back upon `UIAutomation`'s visibility routine
if (but only if) the device is in a non-portrait orientation.