Extract out RPC interface.

Add DummyRPC interface for testing.

All sync state methods are now members of the Synchromesh class.

Update tests to use dummy rpc.