New tests:

- sync up with locally created records
- sync up with locally deleted records

Also fixes in SyncManager for bugs that the tests uncovered