Sync data to the server periodically.

  - add SyncAlarmReceiver
  - add SyncService
  - moved the test sync code into SyncService
  - add appropriate permissions, services and receivers to AndroidManifest.xml
  - add getLatestLocations() method to LocationsDB
Fixed the syncing bug and added latestid