Refactor backend logic out of special page

Creates a MergeUser class which handles all the database
updates and page moves.

The output for the special page was also trimmed down, it
no longer spams a bunch of useless output.

Change-Id: I2bfcecad9994abaf8c58ec1ba0e02bc33309cf72