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