Move main key id into the Contact base class.

Set the main key when doing the contact request.
Untested client side version of branch publishing.