Import Files: Test for Unsync'd record and try fixing
Merge branch 'master' into testunsync
Attemp to fix syncing issue: Not working...

This doesn't work because it seems that as soon as a record fails to
sync (in the ActivityLog table in this case) then it doesn't matter
if you later delete the record and try again, the table is somehow
flagged as no longer syncronised and will no longer save back to
the main database.
Add DatabaseState to handle synchonising issue