resolves #804 rewrite extensions to support extension instances

- rewrite extensions to support extension instances
- document extension APIs
- introduce DSL for configuring extensions
- add named group registration
- add require library flag to cli
- other minor refinements