Clean up onResourceLoaderRegisterModules() to make it more data-driven

Bonus: it's now half the size.

Change-Id: I0946eaa8794b49e44a2791befe024e1bc475c0b8
Merge "Clean up onResourceLoaderRegisterModules() to make it more data-driven"