Add Type() method on flags for compat with pflag library

Allows our flag objects to be used with both golang flags and pflags
test-cmd should test all api versions
Prevent infinite loop in apiserver errorJSON
Merge pull request #2905 from smarterclayton/misc_cleanup

Small fixes to prepare for v1beta3