refactor: cli: command.getNames() is now command.aliases.

Also turn command.canonical() into a class method. All this so that commands
don't need to be instantiated just to check if command line matches them.