Move watch filter into storage level

Fix #2663  @smarterclayton 
You can use watch.Filter (or transform) from the rest code or watchandtransform from inside the registry.  Right now a lot of our "stitch resources together" stuff is in rest which works ok for most - I think I'd lean towards watch.Filter in Rest, but that's just because we're transforming the underlying data before returning it.


> On Dec 2, 2014, at 5:10 PM, Deyuan Deng <notifications@github.com> wrote:
> 
> In pkg/registry/pod/rest.go:
> 
> > @@ -184,7 +184,7 @@ func (rs *REST) List(ctx api.Context, label, field labels.Selector) (runtime.Obj
> >  
> >  // Watch begins watching for new, changed, or deleted pods.
> >  func (rs *REST) Watch(ctx api.Context, label, field labels.Selector, resourceVersion string) (watch.Interface, error) {
> > -	return rs.registry.WatchPods(ctx, resourceVersion, rs.filterFunc(label, field))
> > +	return rs.registry.WatchPods(ctx, label, field, resourceVersion)
> @smarterclayton How do you think the we add an extra updater for watch command? Something like:
> WatchControllers(ctx api.Context, label, field labels.Selector, resourceVersion string updater func(*api.ReplicationController) error) (watch.Interface, error)
> 
> —
> Reply to this email directly or view it on GitHub.
>