adds hooks for setting page layout and shell
added getFirstUrlSegment() to request class
Merge pull request #5789 from cash/page_hooks

adds hooks for setting page layout and shell