add utility for binding flags and building api server clients

This utility provides one stop shopping for a command line executable to get bind the correct flags, build the client config, and create a working client.  The code for usage reduces to something like this:

	authLoader := &PromptingAuthLoader{os.Stdin}
	clientBuilder := clientcmd.NewClientBuilder(authLoader)
	clientBuilder.BindFlags(cmds.PersistentFlags())
	apiClient, err := clientBuilder.BuildClient()

I made the flags congruent with kubectl and used kubectl as an example spot for usage.  This makes use of the auth config work in #2340 and the Bind and Build approach could be used to unify client creation and flag names.

@smarterclayton You've had an interest in this area.
I believe Cobras/pflag value interface covers the stdlib pflag but I could be wrong.  So that would be goal.


> On Nov 24, 2014, at 3:38 PM, David Eads <notifications@github.com> wrote:
> 
> In pkg/client/clientcmd/client_builder.go:
> 
> > +	}
> > +}
> > +
> > +const (
> > +	FlagApiServer       = "server"
> > +	FlagMatchApiVersion = "match-server-version"
> > +	FlagApiVersion      = "api-version"
> > +	FlagAuthPath        = "auth-path"
> > +	FlagInsecure        = "insecure-skip-tls-verify"
> > +	FlagCertFile        = "client-certificate"
> > +	FlagKeyFile         = "client-key"
> > +	FlagCAFile          = "certificate-authority"
> > +	FlagBearerToken     = "token"
> > +)
> > +
> > +// BindFlags implements Builder
> We ended up on spf13/pflags because we're using spf13/cobra for commands. Cobra's Value interface isn't directly compatible with flags.Value, so I suspect that drove the usage of spf13/pflags (but I don't know for certain).
> 
> @smarterclayton suggested compatibility with native flags as a follow-on todo.
> 
> —
> Reply to this email directly or view it on GitHub.
>