Fixed removing local (_new) objects

If an object was created, added and removed without flushing in between, it was still persisted. Fixed by directly removing ```_new``` objects from the ```trackedObjects``` array.

**PLEASE NOTE:** This change touches sync functionality, by moving the ```this.objectsRemoved.push()``` call into the ```else``` clause. As far as I can tell, this seems to be the right thing to do. However, I wasn't able to run the sync tests on my Windows setup -- so please only merge this after running the sync tests.