Implement deployments with pods

Refactor the deployment mechanism to be exclusively pod based. Refactor
the deployment API accordingly. Improve test coverage, and provide the
foundational support for implementing more built-in deployment strategies.
Just following the format of the file, I didn't change anything.