support the sync API

add methods sync() and sync(t) for Connection
Merge pull request #71 from pellucidanalytics/topic/sync

Support the sync API