Add support for images & image repositories

The first commit will likely go away assuming @csrwng's builds PR lands first. (#43)

This adds support for images and image repositories to origin. It also adds a webhook for the Docker registry that can be invoked whenever a new tag is pushed to a Docker image repository. The webhook receives data from the registry (repository, image id, image metadata, tag) and stores the data in origin. The corresponding Docker registry changes are here: https://github.com/ncdc/docker-registry/compare/openshift_hook

**TODO**
- [ ] godoc comments
- [ ] tests
- [x] etcd registry implementation
- [ ] validation methods
- [ ] kubecfg support
That's fatalf that exits, not errorf.

> On Sep 3, 2014, at 5:55 PM, Michal Fojtik <notifications@github.com> wrote:
> 
> In pkg/image/etcd.go:
> 
> > +}
> > +
> > +func (r *EtcdRegistry) GetImageRepository(imageRepositoryID string) (*imageapi.ImageRepository, error) {
> > +	var imageRepository imageapi.ImageRepository
> > +	if err := r.ExtractObj(makeImageRepositoryKey(imageRepositoryID), &imageRepository, false); err != nil {
> > +		return nil, err
> > +	}
> > +	return &imageRepository, nil
> > +}
> > +
> > +func (r *EtcdRegistry) WatchImageRepositories(resourceVersion uint64, filter func(imageRepository *imageapi.ImageRepository) bool) (watch.Interface, error) {
> > +	return r.WatchList("/imageRepositories", resourceVersion, func(obj interface{}) bool {
> > +		repo, ok := obj.(*imageapi.ImageRepository)
> > +		if !ok {
> > +			glog.Errorf("Unexpected object during image repository watch: %#v", obj)
> > +			return false
> Errorf exits immediately, no need for return here.
> 
> —
> Reply to this email directly or view it on GitHub.