Add support for passing environment variables through to the container
Move _BASE_DOCKER_COMMAND into a global helper function
Switch to using `stop` with a timeout, instead of `kill` for destroying a container

(Ported from @solidsnack at mesosphere/medea)
Add support for passing resource limits to docker (cpus and mem)

(Ported from @solidsnack at mesosphere/medea)