MB-12028: correctly handle missing master vbucket
MB-12028: correctly handle missing master vbucket

The bug was due to setting ChainStates element to missing instead of
pair {N, missing}.

I've also added more logging and make sure that we assert that at
least head of ChainStates is a pair. Tests are added for cover all
paths through do_sanify_chain.

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

t3rm1n4l/ns_server,mschoch/ns_server,membase/ns_server,ceejatec/ns_server,membase/ns_server,mschoch/ns_server,nimishzynga/ns_server,membase/ns_server,ceejatec/ns_server,ceejatec/ns_server,membase/ns_server,mschoch/ns_server,nimishzynga/ns_server,t3rm1n4l/ns_server,t3rm1n4l/ns_server,mschoch/ns_server,membase/ns_server,t3rm1n4l/ns_server,ceejatec/ns_server,ceejatec/ns_server,mschoch/ns_server,t3rm1n4l/ns_server,nimishzynga/ns_server,nimishzynga/ns_server,nimishzynga/ns_server,membase/ns_server,nimishzynga/ns_server,ceejatec/ns_server,mschoch/ns_server