MDL 38508 JavaScript: Split out AJAX and non-AJAX help

We need to keep these two separate as scripts which define AJAX_SCRIPT
before loading config.php will use a different default renderer and will
return appropriate exceptions which can be parsed by M.core.exception and
M.core.ajaxException correctly.

This also addresses an issue whereby a missing heading could break the
tooltip.