Refactor application into toplevel of margarine.api.

Finished the refactoring of the application submodule from margarine.api
into the top-level module.  Simplifies the API as a module of margarine
with its own runtime.