sqlite fixes

http://jira.mosync.com/browse/MOSYNC-3196