CBIDXT-100 : control messages from go-couchbase.

- passively consume control messages from go-couchbase, like when a bucket is
  deleted.
- KVData path will communicate back to Feed when it exits.
- clean up bucket when all vbuckets and KVData are closed.
- bugfix to protobuf/common.go
- refactored tools/query/query.go script

Change-Id: I4dde5516a95d5e44615f0e8c96b3f224535f2782
Reviewed-on: http://review.couchbase.org/42655
Reviewed-by: John Liang <johliang00@gmail.com>
Tested-by: Pratap Chakravarthy <prataprc@couchbase.com>
Reviewed-by: Pratap Chakravarthy <prataprc@couchbase.com>