Refactor kubelet, standalone k8s and integration test to all use the same code.

Large re-factor, unifies stand-alone k8s, kubelet and integration testing code paths.
Shouldn't this runonce behavior also be moved to standalone?