fix: sync all changes while offline
this implementation is so nasty, it's entirely vibe coded. But it does
work!
the bug we were facing was due to lack of understanding that `colVersion` also needs to be tracked alongside `dbVersion`. we also made some updates to the way the handshake happens for the protocol, introducing sync_request and having the server request changes from the client when it is ahead. The solution is entierly unoptimal right now, possibly with many duplication bugs and request (state tracking for the lastest version on the client side is particularly garbage), but it does work.
I'm also certain that there's code smells surronding authentication, up
to and possibly including overwriting existing keys in the
authentication table.
The v2 spec included in this commit has been implemented up to Phase 1:
Core Protocol. We will still need to implement authorization.