(bug 45167) use SetupAfterCache to register templates.

Avoid using $wgExtensionFunctions in general, and especially
with closures, since they look odd on Special:Version.

Change-Id: I924c856232af8e81ac9e55c10a4a22e2f4f6200a
Merge "(bug 45167) use SetupAfterCache to register templates."