Added "armed" semaphore

This makes it possible for the extension to back off when it detects
another extension already completed a login
Renamed hook functions to reflect hook name
Formatted global declarations
Adhere to "return to" if no logoutredirect defined
Disarm extension if another already logged in
Improved generation of login URL
Always load user on MediaWiki action

Solves https://bugzilla.wikimedia.org/show_bug.cgi?id=65493
Improved SAML attr to MediaWiki-user conversion

Removed a lot of unnecessary code
Better adheres to MediaWiki API,
Validates SAML attributes in a more sensible way
Better error reporting
No more (apparent) silent refusal of logins
Fixed whitespace
Added emphasis
Merge branch 'codecleanup'