MB-12222: refactoring of mnHttp
MB-12222: refactoring of mnHttp

This change brings possibility to attach each
pending query to the scope or even attach group of queries
which belong to the specific promise like when we doing
$q.all([query1, query2, query3]).

By the logic each query should be marked as either isAttachedToScope
or doesNotBelongToScope. That logic gives us ability to avoid passing
of the scope through stack of calls from controller to mnHttp, but
at the same time it forces us to add those flags to each call using
mnPromiseHelper or mnPoll. Also this change contains code style in
accordance with new style guide.

Change-Id: Ic55d24116068e0a402401933feed3f5b33d05b35
Reviewed-on: http://review.couchbase.org/55093
Reviewed-by: Artem Stemkovski <15a0730a27c69f62ab86f2b6c639fca202166c02@couchbase.com>
Tested-by: Artem Stemkovski <15a0730a27c69f62ab86f2b6c639fca202166c02@couchbase.com>

ceejatec/ns_server,membase/ns_server,ceejatec/ns_server,membase/ns_server,membase/ns_server,ceejatec/ns_server,membase/ns_server,membase/ns_server,membase/ns_server,ceejatec/ns_server,ceejatec/ns_server,ceejatec/ns_server