spawn cbq-engine if ENABLE_QUERY environment variable is defined

This is initial and simplistic integration of query engine into
couchbase. It does nothing else but spawns cbq-engine on every
node. cluster_run case is taken care of as well.

Change-Id: I9ae49132e86859986e2f813f0906374159b9e078
Reviewed-on: http://review.couchbase.org/41573
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
advertise n1ql service port in terse bucket info

Change-Id: I0f8c5b23efb51a01a9a691cda32fbacd261064a3
Reviewed-on: http://review.couchbase.org/41574
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
added initial impl. of /pools/default/nodeServices endpoint

nodeServices allows clients to figure out all services of all nodes
without having to specify any bucket. This might be particularly
useful for niql.

Change-Id: I79bf9dfd82023c7cdd462dbf6c5110f7c0cbb24a
Reviewed-on: http://review.couchbase.org/41575
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
fix and use ns_config_replica:get_compressed

Change-Id: I7db8172e035ffb0ea873b76e74cad0f0fd470eba
allow to initialize config by pulling it from another node

we also need to create duplicate set of node related keys for the node
we are copying config to in order for calls like search_node to
work correctly
initial implementation of couchdb node with the copy of config

no config replication yet

Change-Id: I934f5cd8e601cf1a830af9a96b060777748f1762
config replication from ns_server node to couchdb node

Change-Id: I05973c066c6953d9f76224f5ec1148a431b20f28
make single_bucket_sup a parameter in ns_bucket_worker_sup

so the same supervisors can be reused for couchdb node

Change-Id: I8a753e5ec8cee5cfab6c581ba710e7d80d718b02
handle ns_server node rename on ns_couchdb node

Change-Id: I0212a061f9d4522a300c3cd7120679dbe0a9c14b
do not use couch_config from ns_config_default

since there will be no couch_config on ns_server node, use env variable
with default value instead

Change-Id: If4bc21d0f4bc2fef55be83e36aa7e70587a0cff8
make sure that modules for child nodes are loaded in the same order

... as for ns_server node

Change-Id: Iec5f19c11046506d18063932e8c312a40b17e675
use sockets from pool for all compaction related calls to memcached

to be able to run compaction daemon on a node without ns_memcached
server

Change-Id: I193fd60957eaa973860452436bc63e2202c4082b
use http to access couchdb on handling /couchBase urls

the existing hack with passing mochi request to the couchdb web
server won't work after couchdb will be moved to different node

Change-Id: If176e18f2e33777e4b4f9bda5601bb974be137a0
remove unnecessary opening/closing of master db from xdc_vbucket_rep

Change-Id: I4da4e696c98121297db3cbb3cc3e4f18b9a6ce5e
wip

Change-Id: I6604b217b7fc3aea16545fb1f116946ebf95b5fd
sorted_full_live_ddocs

Change-Id: I7c29516647b8a5fbc126c41c7b6059b85f71ff84