Rearrange so the database can be closed

Rearrange so the database can be closed.  Add Location sync support.
Add a 120s wait between iCloud update & read

Give iCloud a bit of extra time to work.
minor changes
Sync Location.  Matchkeys use only letters/numbers

Also add support for non-numeric sync keys to support Location