iOS fixes

This pull request consolidates a bunch of fixes that are required to support a wide range of iOS devices. Note that for this to fully work, one more fix is required in the app controller of the app that will be using the angular-jqm framework. For full details of this additional fix and my iOS test matrix, see my comment in angular-widgets#179