SERVER-14041 enhance secondaryThrottle parameter

This reverts commit 37f2a1e3b724dbd9e1f8eafd4ac87c5bf613c048 (undo revert).
This reverts commit d60fd22dec1c0bd104622eab463cdbba18bf11a9 (undo revert).
Fix Windows compile failure.
Add more defensive checks.
SERVER-14549 Don't send replSetUpdatePosition command unless all slaves have sent their handshake
SERVER-14581 add lockstate to cpuprofiler.cpp
SERVER-14186 map/reduce check for ismaster under write lock

We need to check master-ness under a write lock before doing a logOp() or else
the server might shut down.

(PARTIAL cherry pick from commit f65ef0b5c272d94f500ea615e36023b45cdf088e)

Conflicts:
	src/mongo/db/commands/mr.cpp
	src/mongo/db/dbcommands.cpp
SERVER-14436 Introduce ReplicaSetConfig type, with validation tests.
SERVER-13640 Port and re-enable collection scan tests
SERVER-14417 added comments describing how to enable/disable QLOG using command line/config file/shelll
SERVER-14592 de-inline bson and remove bson namespace
SERVER-14532 additional logging for plan ranking ties
SERVER-14599 Fix error that caused ReplicationExecutor::getWork to busy wait on some platforms
SERVER-14458 swap LegacyReplicationCoordinator for the HybridReplicationCoordinator
SERVER-14135 remove a call to isGod() from LegacyReplicationCoordinator
SERVER-14587 Add hash function to OID so it can be stored in an unordered_map
SERVER-11107 added ssl certificate expiration monitoring

Closes #712
Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
SERVER-14024: validate update insert fields at the end
SERVER-14033: implement prepareRequestVoteResponse
SERVER-14033: implement prepareElectCmdResponse in topology coordinator
SERVER-14033: implement prepareStatusResponse, prepareFreezeResponse in topology coordinator
SERVER-14033: fix topology coord mock sigs
SERVER-14250: add timeout to replication executor