Move includes of other functionality to top of functions.php

Improves readability
Remove closing PHP tag
Tweak spacing for readability
Refactor handling of sup and sub around missing page_for_posts

WordPress has no page assigned for posts by default, so we'll need
to work around that for determining proper sub and sub headings.