Generalize "load *.html files first" hack

Now any plugin can request that its files be treated as "templates" by
setting an isTemplate flag.

(This API is just as supported as you'd expect based on the fact that
you still can't access it without calling a function which starts with
"_transitional_".)

Tested by renaming leaderboard.js to a.js and confirming that it still
works (and that it *doesn't* if templating does not set isTemplate).