Add contact manager and database methods for converting a pending contact
Subtask of #1232.
issue