Rationalise header system.

This removes all of the special-case code from the header, and places it
in the page code. It also adds some functions for getting and sanitising
parameters.

New usage:

require('includes/start.php');
$title = 'Page Title';
require('includes/header.php');