[ALOY-1116] updated optimized sync adapter code

Resolves https://jira.appcelerator.org/browse/ALOY-1116

You must revert the previous change (pull 562) before merging this pull request!