setup for accelerometer on iOS and fixed geolock bug

Added initial code to support accelerometer on iOS.  Porting over as
much code that works as possible from Android side.  Also fixed a bug
where the "geoLock" functionality was running whether the user chose
the option or not.