Revert "Revert "Auto-migrate matching accounts where no global account exists""

This reverts commit 3a2bb63e49edb5f3d64aa253c9ce698a089e2c5c.

The performance issues that made a user unable to login
should be taken care of with I7a22fa582.

According to the logs, this has been pretty useful so far,
creating 57 global accounts in few days it was deployed,
mainly on commonswiki. I expect that number to go up
significantly when this code hits the Wikipedias.

Change-Id: I3068ce23efc96891f32bb9ee360827f00671b208