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.

Final nit: All public functions should have a godoc-style comment. The only restriction about the comment is that its first word should be the name of the function.