Simplify MetaInsertionFactory down to one implementation

Uses reflection instead of conversion, easier to understand and to change in the
future.

Other minor cleanup.

Extracted from #1600
Yeah - couldn't think of an easy way to parameterize efficiently so just punted.  Will add note.


> On Oct 13, 2014, at 8:40 PM, Daniel Smith <notifications@github.com> wrote:
> 
> In pkg/conversion/meta.go:
> 
> > +// information for all objects in a scheme.
> > +type MetaFactory interface {
> > +	// Update sets the given version and kind onto the object.
> > +	Update(version, kind string, obj interface{}) error
> > +	// Interpret should return the version and kind of the wire-format of
> > +	// the object.
> > +	Interpret(data []byte) (version, kind string, err error)
> > +}
> > +
> > +// DefaultMetaFactory is a default factory for versioning objects in JSON/YAML.
> > +var DefaultMetaFactory = SimpleMetaFactory{KindField: "Kind", VersionField: "APIVersion"}
> > +
> > +// SimpleMetaFactory provides default methods for retrieving the type and version of objects
> > +// that are identified with a "APIVersion" and a "Kind" field in memory and in their default
> > +// JSON/YAML serialization. It may be parameterized with an optional list of base structs
> > +// to search for those fields.
> Add that it's assumed that "kind" and "apiVersion" are the forms on the wire? Would be nice to parameterize those too at some point.
> 
> —
> Reply to this email directly or view it on GitHub.