Clean up registration of modules

Let EventLogging register the schema.Popups module, just pass it
the information via a hook.

Also move the ResourceLoaderRegisterModules hook into the hooks
file instead of a global closure.

Change-Id: I74a1db0e6ca38ca3a341a99fcaa6009c8dc18b6d