refactored config stuff into a separate class

this enables me to hoist config info into the App class, where I can get to it before the command is instantiated
this forced to break some other stuff apart, including breaking the directive() method in two
but I still think it's cleaner now, because (again) I was trying to do too much in one place
for some reason I was getting a list containing undef instead of an empty list

it might be a bug that I just papered over, but this is good enough for now
can now have custom commands in a policy