MB-8872 add basic auth to all issued _view_merge and _spatial_merge requests

with user = ns_server and password = erlang:get_cookie()

Change-Id: I9456f3f0d2f9dee199a78748e7e11ed0e111ffee
Reviewed-on: http://review.couchbase.org/43375
Tested-by: Artem Stemkovski <artem@couchbase.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-8872 check basic auth for _view_merge requests

for backwards compat with pre 3.0.2 clusters allow anonimous access
if not all of the nodes have 3.0.2 or higher version

Change-Id: Ib14e5fd4a9d18de92893dd89a936f8f03f2727f8
Reviewed-on: http://review.couchbase.org/43376
Tested-by: Artem Stemkovski <artem@couchbase.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Merge branch 'rel-3.0.0++' into rel-3.0.1

* gerrit/rel-3.0.0++:
  MB-8872 check basic auth for _view_merge requests
  MB-8872 add basic auth to all issued _view_merge and _spatial_merge requests

this is trivial merge

Change-Id: I5298485ce34036042e923c530a88b38c2d334200
Merge branch 'rel-3.0.1' into 'master'

* gerrit/rel-3.0.1:
  MB-8872 check basic auth for _view_merge requests
  MB-8872 add basic auth to all issued _view_merge and _spatial_merge requests

Conflicts:
	src/cluster_compat_mode.erl

Non-trivial changes were made in order to unbreak MB-8872 fix in 3.2

Change-Id: I5bb1ab6ff964ba8b990ccbfbe3019162986994f9