MDL-46031 output: better handling of once-per-page items

In several places we only want to output a certain bit of HTML (e.g. the
contents on the mod chooser) once per page.

This used to be done with a static variable in the function, which
meant the logic was once per PHP-script execution, not once-per-page.
Now there is a new bit of API in page_requirements_manager to handle
this properly.