First pass at implementing modules

This first step creates the notion of a module and corresponding
lifecycle functions, with helpers to simplify working with them.

Once everything is converted over to this module format, then we
can make the stack manager automagically find the correct order for
init/start_up/shut_down/clean_up
4 files changed