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

Sometimes I get the "Set the orientation, but app refused to rotate." exception, even though I can see on the device that the orientation has changed successfully. As a workaround we can try to return error only if the orientation change has not taken effect after a timeout (2s).