Fix template errors handler to use proper request.
Document hangup handler in sample config file.
Add output buffering for http status header.
Fix http status code handling.

Set() method replace with magic set.
Fix 301 so as not to output any potential gz buffer
Enable partial template rendering for ajax calls.

If an ajax call accepts text/html (or just any 'html') then render
just the 'main' template section.