Add gtest conformance tests for libsync.

Not complete yet, but substantially more comprehensive than the
interactive test that was there before.

(cherry-picked from internal master, same change-id).
Change-Id: I9019b0a8babbc91f78aa850e0e288bbf05f93500
Merge "Add gtest conformance tests for libsync."