SERVER-10554 Patch memory leak in aggregation

The issue was that empty documents are represented as a NULL pointer and
Value didn't ref count NULL pointers. This is fine for all public
interactions with Value, however MutableDocument can change the pointer
in-place when updating a nested field. This caused a leak when it
transitioned a Value from holding a non-refcounted NULL pointer to
holding a real pointer since MutableDocument/MutableValue didn't set the
refCount bit.
Add check to prevent future memory leaks like SERVER-10554
SERVER-10596 Globalize formerly per-thread Pool of JS Scopes

This ensures that the limit of 10 pooled scopes is actually enforced.
With a per-thread Pool, long-lived connections could cause very high
memory usage (both real and virtual) even if they haven't used JS in a
long time.

Manually fixed backport of commit 73841f7a1ec1322d96179eb2712ab438f56add00

Conflicts:
	jstests/auth/js_scope_leak.js
	src/mongo/db/auth/auth_external_state.h
	src/mongo/db/auth/auth_external_state_d.cpp
	src/mongo/db/auth/auth_external_state_d.h
	src/mongo/db/auth/auth_external_state_s.cpp
	src/mongo/db/auth/auth_external_state_s.h
	src/mongo/db/auth/authorization_session.cpp
	src/mongo/db/auth/authorization_session.h
	src/mongo/db/commands/group.cpp
	src/mongo/db/matcher/expression_where.cpp
	src/mongo/scripting/engine.cpp
SERVER-10724 better exception handling in health poll
SERVER-10261 disable ssl session caching (affects java driver)
SERVER-9738 mongos should set the CursorNotFound bit when the cursor is not found
SERVER-9738 mongos should set the CursorNotFound bit when the cursor is not found

Lower invalid cursor log level from 6 to 3.
SERVER-9907 Allow to skip initial count() in mapreduce

Added option to hide the total in the progress meter.

Conflicts:
	src/mongo/util/progress_meter.cpp
SERVER-9907 Allow to skip initial count() in mapreduce

Do not count total documents to process if filter is given.
SERVER-6008 put the logic for DAEMON_OPTS= and -- into the "if which numactl"

I hope this is correct, I have signed the contributor's agreement.

Signed-off-by: Ernie Hershey <ernie.hershey@10gen.com>
SERVER-6008 move '--' out of DAEMON_OPTS rvalue
SERVER-9861 explicitly forget temporary collections for versioning in M/R
SERVER-10421 buildbot use unique coll names for geo_circle2a.js and eval2.js
SERVER-9993 Accept any numeric type for the maxSize field in config.shards
SERVER-9501: initial sync exception: 10083 Changed validation to allow explicit creation of size 0 collections. Should be backported to 2.4.X

Signed-off-by: Matt Kangas <matt.kangas@10gen.com>
SERVER-9109 continue rather than return on ECONNABORTED and EBADF
SERVER-10285 uassert that s2latlng is valid, print out if it's not

Backport original commit: ce6607fd28df1cc7c57a6ea03dcb0676e7a009ce
SERVER-10462 compensate for Windows file locking race
SERVER-10594 slaveOk bit ignored for unsharded aggregate

Backport of original commit: 84ff1694c4bf92f3deef5c013ac9a5b912e6f96f
SERVER-10655 aggregation_auth : mongos_slaveok.js failing

Improve test.