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.
Perhaps just embed this inside RunKubelet instead of having its own function?