Test for sync up with locally deleted
Refactored common code
Checking that after sync up cached records are no longer marked as local
Testing sync up with locally created records
Merge pull request #229 from wmathurin/unstable

JS tests for sync up with locally deleted and locally created records