on starting mb_master check if current master needs to be killed
on starting mb_master check if current master needs to be killed

The idea is that joining new node will not complete until all
supervisors are done starting services. So we're delaying new
mb_master startup while checking if we need to take over old master's
mastership.

Note we're doing it from start_link rather than init so that mb_master
is not yet registered which prevents deadlock in other nodes trying to
do same sync check.

Change-Id: I0225a437d2be03d9d930ad9c7721b0b0b2d063d3
Reviewed-on: http://review.couchbase.org/14689
Tested-by: Aliaksey Kandratsenka <340b8e09ca65cd3fc686427fcfed17e87eaf61e2@gmail.com>
Reviewed-by: Aliaksey Artamonau <3c875bcfb3adf2a65b2ae7686ca921e6c9433147@gmail.com>

membase/ns_server,mschoch/ns_server,ceejatec/ns_server,pavel-blagodov/ns_server,nimishzynga/ns_server,membase/ns_server,pavel-blagodov/ns_server,mschoch/ns_server,ceejatec/ns_server,ceejatec/ns_server,nimishzynga/ns_server,mschoch/ns_server,daverigby/ns_server,daverigby/ns_server,t3rm1n4l/ns_server,membase/ns_server,vzasade/ns_server,vzasade/ns_server,nimishzynga/ns_server,daverigby/ns_server,membase/ns_server,membase/ns_server,pavel-blagodov/ns_server,pavel-blagodov/ns_server,ceejatec/ns_server,t3rm1n4l/ns_server,vzasade/ns_server,mschoch/ns_server,t3rm1n4l/ns_server,daverigby/ns_server,t3rm1n4l/ns_server,vzasade/ns_server,mschoch/ns_server,daverigby/ns_server,ceejatec/ns_server,membase/ns_server,mschoch/ns_server,nimishzynga/ns_server,nimishzynga/ns_server,t3rm1n4l/ns_server,nimishzynga/ns_server,ceejatec/ns_server