SERVER-12132 Stop using stringstream in Value::coerceToString()

This speeds up the function by two changes:
1) Using StringBuilder (through str::stream) rather than stringstream.
2) Not constructing a StringBuilder or stringstream when not needed.

At least with libstdc++, constructing and destructing a stringstream is
extremely expensive.
SERVER-11443 Support all expressions in $redact, not just objects
SERVER-11708 Cache RHS set in $setIsSubset
SERVER-11368 Move final $unwinds from shards to merger
SERVER-11413 Make agg explain work with new query framework
SERVER-11831 Use documentFromBsonWithDeps in agg again

This bypasses new query framework projection and replaces it with a much faster
dedicated code path. The downside is that it prevents using covering indexes
in the cases where that was allowed (SERVER-12015).
SERVER-11675 Agg text support

To enable this, Documents now can store "metadata" that gets carried though
the pipeline as long as the result is the same logical document. This includes
crossing the shard-to-merger boundary.
SERVER-11611: remove DataFileMgr::insertAndLog
Initialize variable for correctness per pull/24
SERVER-12110 Safe buffer handling in SSL pw callback
SERVER-12110 Fix assertion number collision
SERVER-9469 Set ok field in response to 1 if write was applied

Also removed promotion of writeErrors to top level field errors and made sure that right error fields are used.
SERVER-8871 removed default switch case from encodeMatchType
SERVER-11813 Output date as string in jsonString strict mode
SERVER-12167 properly shutdown replsetTest bridges
SERVER-9469 upserted field from write command response is now always an array.
SERVER-9469 proper optime BSON type in batch result
SERVER-10026 port old dbtests to single_solution_runner_test

Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
SERVER-12092 Fix mongorestore warning that collection options changed

Variable "obj" being shadowed by declaration in containing scope.
SERVER-11969 w:0 on sharded write command is returning upserted values