Protocol versioning for the contact exchange protocol
This branch converts the contact exchange protocol to a record-based format, similar to the key exchange and sync protocols. This allows us to declare the protocol version and type of each record, and skip records with unrecognised types.
At present the contact exchange protocol rejects records with unrecognised protocol versions, in line with the approach taken by the key agreement and sync protocols. I think we should reconsider this, but it's outside the scope of this MR.
Rather than create a third record reader/writer implementation, I created a generic implementation and converted the key agreement and sync protocols to use it.
Closes #617 (closed).
Edited by akwizgran