Set and override global locale

This sets the global `I18n.locale` for a request based on the loaded content item so that any calls to `I18n.translate` return the appropriate translation (e.g. the `:context` in the title component).

The pull request also refactors the way in which page direction is determined such that views now have access to a single helper method - `page_text_direction`. The upshot is that layouts, views and partials can now all rely on this one method instead of relying on the presence of an instance variable.