command resource fixes

- user correct resource in helper methods
- new method for getting resource's name
automatic subcommand loading
finding resources in enclosing modules
resources reworked into classes
- api resources in commands are encapsulated in classes - simplifies (re)usage
- command instances try to look up resources in parent commands if they don't have their own resource set
fix for output dsl
added missing parenthesis
Merge pull request #32 from tstrachota/assoc

Changes to support fix for #2844 in hammer-cli-foreman