Updates to migrateAccount.

Adding the ability to attach matching local accounts to a global account,
the abilty to merge a number of local accounts if the email addresses
match and are confirmed, and also some preparation for the next steps.

Change-Id: I71ee8b635051b8c7a7176bbba1b5a30d27ffea98
Merge "Updates to migrateAccount."