Add contact manager and key manager methods for converting a pending contact
Third attempt, this time solving the tag reuse issue by deriving a new root key for handshake mode when the pending contact becomes a contact. Keys are no longer transferred inside the DB. Instead we derive the new keys, remove the pending contact and add the contact.
The static master key is derived while holding a database transaction, which is acceptable but not ideal as this is an expensive crypto operation. We could consider moving this onto the crypto executor in future, which would mean splitting ContactManager#addPendingContact() into separate create and add methods, and likewise for the addContact() method that takes a pending contact ID. The static master key would become a PendingContact field, and would be stored in the DB, saving us the cost of re-deriving it (at startup to get the rendezvous keys, and when converting the pending contact to a contact). These are fairly big changes that can be deferred, so I thought I'd put this up for review first.
Closes #1570 (closed)