Version fixes

Here are some changes to improve handling of Kubernetes versioning.
1) Now all commands are able to parse a -version flag.
2) Version generation from git is more robust and more complete.

I'll inline for now.

I was thinking that possibly kubecfg -server_version and -expect_version_match could use it but let's leave it to refactor it then if required...