Define a mapping between REST resource name and kind/apiVersion

Allows clients to abstractly map user input to generic resource
paths as per docs/api-conventions.md

Extracted from #2000 and supports #1958
Pushing apparently helps.

----- Original Message -----
> > +func kindToResource(kind string, mixedCase bool) (plural, singular string)
> > {
> > +	if mixedCase {
> > +		// Legacy support for mixed case names
> > +		singular = strings.ToLower(kind[:1]) + kind[1:]
> > +	} else {
> > +		singular = strings.ToLower(kind)
> > +	}
> > +	if !strings.HasSuffix(singular, "s") {
> > +		plural = singular + "s"
> > +	} else {
> > +		plural = singular
> > +	}
> > +	return
> > +}
> > +
> > +// VersionAndKindForResource implements RESTMapping
> 
> Needs push?
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/GoogleCloudPlatform/kubernetes/pull/2059/files#r19772364