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