User ctrl refactor - breaks up large methods, moves some logic into model

Includes missing methods from backup for travis to pass

fix missing code, failing specs

keep params handling in the controller.
Merge pull request #1581 from railsaholic/salvage_users_controller_refactoring_from_pr_1499

User ctrl refactor - breaks up large methods, moves some logic into model
remove problem spec that does not work properly in rails 4 mode into application controller and correct it
add logic that auto closes any topics that missed the queued job (due to redis flush or whatever)
correct logic for tracking incoming links
Merge branch 'master' of https://github.com/discourse/discourse