Added a timeout (2s) for orientation change on Android.

When changing orientation on Android, return error only if
the orientation change has not taken effect after timeout (2s).
Merge pull request #1313 from paymand/orientation_busy_wait

Added a timeout (2s) for orientation change on Android.