MB-11825: 2.5.1 hotfix: MB-11411-MB-11037-MB-11825

Change-Id: I8c0e1e9e2e0d7d04fa0cffbd1fa477b526a4e578
Reviewed-on: http://review.couchbase.org/39937
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Tested-by: Chris Hillery <ceej@couchbase.com>