Fix stuff from kali's review.
Turn SQLCipher.sync_state into a ClientSyncState instance.