Requests for comment/OutputPage refactor

The current OutputPage class mixes hard-coded HTML/header statements with function calls and hooks in a way that makes it monolithic and hard to modify. Things also happen in a specific order and frequently can’t be changed or modified after being executed. We have worked around most of these issues and added some features. We changed how redirects and head elements work, added configurable top/bottom page script injection, changed some session related code, changed the display of permissions errors, and added helper functions to manipulate the page meta keywords. Most of these changes could be merged to core or refactored to be hooks.

TODO: Go through Wikia changes to OutputPage and Skin classes and draw up a proposal for refactoring based on that.