Item10824: Implement HEAD support.

Thanks to AndrewJones for the patch and MichaelDaum for the
cache changes.

I'm not sure the unit test is completely valid.  It passes regardless of
whether or not the patch is applied.  However the fix is definitely
working, as a HEAD request for System/Macros takes >7 seconds without it
and 500ms with it, so the early return is valuable.