A new developer setting that adds comments in the page HTML specifying
which template is used to render each part of the page. It can be set
form the site admin development tab and it is stored
as $CFG->debugtemplateinfo.
This change moves several repeated sections of code that was searching
for templates and valid template locations to a new class. It adds
unit tests for the new class and verifies subsystem support for templates.