Add client side validation to kubecfg and kubectl.

This addresses at least part of #1352.  Builds on #2492.  Please only review the second commit.
Merge conflict.