I think this is the way we want to do this.
Provide a way for out-of-tree users of lualoader to patch into the loader system without having to modify our distributed scripts.
This is not a catch-all. There are some (very few) things that happen when our modules are loaded. I think we will need to provide hooks to modify or completely override these behaviors as we introduce them, unless they're something that can easily be overwritten (e.g. core will set a default ACPI setting on import).
We'll also need to rewrite other things to be a little more friendly to other consumers, such as how the menu system processes menu entries. These should probably be setup as a table of entry type => processor functions so that out-of-tree consumers can trivially add their own menu types or alter behavior if they want different behaviors. This obviously applies to menu drawing as well.