CBD-220: switched ns_server_sup to supervisor2

So that we don't have to rely on supervisor_cushion for compaction
daemon.

Change-Id: I1199636cbf1142a4742423120b443ae7cec09de9
Reviewed-on: http://review.couchbase.org/25429
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
CBD-220: [ale] allow syncing all log messages to all sinks

So that we can exit without bothering to shutdown ale cleanly

Change-Id: I14829b98254fb567f0c6b3282c438d5a86a7d7eb
Reviewed-on: http://review.couchbase.org/25430
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
CBD-220: run memcached and ns_server from babysitting VM

I.e. so that:

a) windows nodes can finally rename themselves. Because ns_server is
run as ordinary erlang VM, not as direct erlsrv child

b) death of ns_server cannot bring down memcached

As part of this change we're changing a way cluster_run control
lifecycle of it's childs. I.e. instead of using posix but apprently
not OSX-compatible testament_child_death trick, we're now starting
babysitter in a same way ns_server or our usual port servers are
started. I.e. by having pipe into stdin and if that pipe is closed
(i.e. cluster_run dies) babysitter will just die asap (but shutting
down memcached and ns_server quickly before exiting).

initscript is started similarly as before, main difference being
startup of ns_babysitter_bootstrap rather than ns_bootstrap. And
shutdown is handled similarly, just via ns_babysitter_bootstrap. As
before, stop action spawns executioner erlang node that remotely asks
babysitter to shutdown gracefully. Stop action waits for shutdown of
all components just as before.

Babysitter VM is designed to be as minimal as possible. So it only
supervises ns_server's port server as well as dynamic set of child
port servers via ns_child_ports_sup. As part of ns_server startup
it'll contact it's own babysitter (via static 'babysitter_' + node()
name) and set it's ns_child_ports_sup dynamic childs. NOTE: there's a
tiny race there because we start ns_server first. But this is handled
by making ns_port_setup entry in supervisor be crash resistant (via
supervisor2 feature). Such behavior is made in order to have shutdown
start with memcached & moxi and stop ns_server last. That's good
w.r.t. having stats all the way until memcached shutdown. But it's
also required to have mccouch running so that ep-engine buckets can
continue persisting their stuff.

In addition to pure babysitting I also had to place some simple crash
logging facility into babysitter vm. I.e. so that memcached crashes
are visible in ns_log as before. This new facility preserves last 100
crashes which ns_server's component consumes and logs into ns_log.

Change-Id: Id4f1e6185726a2e9040b88400a99e38d44390bb0
Reviewed-on: http://review.couchbase.org/25462
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-7398: added CHANGES entry for hostname management feature

Change-Id: If5499f8d6001686f9f4f8bef436e92aac3c077d1
Reviewed-on: http://review.couchbase.org/25463
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-100: provide api for testrunner for messing with memcached

I.e. because it currently relies on ns_port_sup which is now dead.

This also creates special erlang module explicitly dedicated for all
kinds of tricks testrunner or any other testsuite wishes to perform on
guts of ns_server. But in a clean, controlled and explicitly
ns_server-supported way.

Change-Id: I8f3597f1e9f681f6df481be55f8f2b9f3f70f570
Reviewed-on: http://review.couchbase.org/25475
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>