Start to break out the means to run a command in a container

Also introduce a "resource context" which will carry configuration
parameters for the resource controllers.