Distance -1 fix and sharedPreferences fixed

* Fixed bug distanceToTarget being -1 for a short time after waypoint change and thus switching directly to next waypoint as -1 < 50
* Moved sharedPrefs operations to Activity, as even with multi process flag shared preferences edits do not persistently save in xml file