Update persistence.sync.js

if the uri of the sync server, already has other parameters, then encodeUrlObj tests for this.
When the updates are in the thousands range, the large parameters for the executeSql breaks execution, so the cacheAndFindUpdates is called in chunks of 500 updates. 
Finally if the server responds with an empty updates, the callback was not called.