Dynamic query rule support for vttablet

A few changes in this patch:

1. QueryRuleSources top level framework to manage dynamic query rule sources
    - Pluggable machanism for new dynamic query rule implementations
    - Complete decouple of query rule management and query service
2. File based and Zookeeper based dynamic custom rule support
3. Unit and site tests for dynamic query rule machanisms
I was thinking about backward compatibility: people may have been using the
previous "customrules" flag, and our new version should be able to support
this. Anyway, the flag "customrules" sounds like a general one, and what we
really need here is the "filecustomrules"

2014-12-22 16:21 GMT-08:00 sougou <notifications@github.com>:
>
> In go/vt/tabletserver/customrule/filecustomrule/filecustomrule.go
> <https://github.com/youtube/vitess/pull/265#discussion-diff-22198739>:
>
> > +	"time"
> > +
> > +	log "github.com/golang/glog"
> > +	"github.com/youtube/vitess/go/vt/servenv"
> > +	"github.com/youtube/vitess/go/vt/tabletserver"
> > +)
> > +
> > +var (
> > +	// Actual FileCustomRule object in charge of rule updates
> > +	fileCustomRule *FileCustomRule = NewFileCustomRule(DefaultFilePollingSeconds)
> > +	// Commandline flag to specify rule path, this is compatible with previous versions of vttablet
> > +	fileRulePathCompat = flag.String("customrules", "", "file based custom rule path (same with filecustomrules)")
> > +	// Commandline flag to specify rule path
> > +	fileRulePath = flag.String("filecustomrules", "", "file based custom rule path")
> > +	// file path that contains rules
> > +	rulePath string
>
> Why do you need three vars?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/youtube/vitess/pull/265/files#r22198739>.
>