Add version negotiation to sync protocol
Add a record to the sync protocol that tells the remote peer which versions of the protocol the local peer supports. Send this record at the start of every session. Remember the last set of versions received from the remote peer and use them to decide which records we can send.
Subtask of #1434 (closed).