update readme about how to sync to your own server
add the sync function source (copied from the PhoneGap version)