For consistency with other skins, its easier to see how hooks are
invoked when they are separated from the skin.
The skin is also updated to use namespaces and modern skin registration
which has been available since MediaWiki v1.36.
Change-Id: I1c93d4e817b53c93eba47ee9086c86c5d75443e5