Removing the SourceId from preferences

Updated Locations to hold the SourceId that generated them
Updated the Coordinator to use the SourceId from the location
Updated Location generation code to write the SourceId
Updated the Database to add a SourceId column

Minor tidyup of logging etc