SERVER-11264 Include OS X minimum version flag on link lines
SERVER-11099 Partial cherry-pick from upstream v8 to fix UB related mongo shell crash

This is a backport of the portion of https://github.com/v8/v8/commit/b3775cf3
relevant to our vendored version of v8. Please see that commit for more
details on the nature of the undefined behavior and how this change fixes it.

This will repair the issue with the mongo shell crashing on shutdown
when compiled with clang-3.3 or newer.
SERVER-11183 Conditionally disable test that clang-3.2 mis-optimizes.
SERVER-9516 Relax type requirements for second parameter to sequenceContains().
SERVER-9516 Mark admin.system.version as a legal namespace.
SERVER-9516 Support for determining and examining the version of the auth schema in durable storage.
SERVER-9516 Eliminate declaration of unimplemented function, update comment.
SERVER-11156: Remove useless test from DBCollection.prototype.save().

Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
SERVER-10848 In auth passthrough, don't attempt to authenticate a conn while you're in the process of adding the user
SERVER-11196 ensure .deb and rpm packages conflict with mongodb-server, mongodb-dev, and mongodb-clients

Signed-off-by: Ernie Hershey <ernie.hershey@10gen.com>
SERVER-11222 Refresh invalid users exactly once per command authorization check
SERVER-11204 Catch c++ exceptions in JSThread
SplittableDocumentSource shouldn't inherit from DocumentSource
SERVER-4816 Sharded agg $sort now merges sorted streams

This enables using indexes for sorting on shards, and gives better distribution of work.

Explain before:

mongos> db.runCommand({aggregate:'foo', explain:true, pipeline: [{$sort: {_id:1}}]})
{
        "splitPipeline" : {
                "shardsPart" : [ ],
                "mergerPart" : [
                        {
                                "$sort" : {
                                        "sortKey" : {
                                                "_id" : 1
                                        }
                                }
                        }
                ]
        },
        "shards" : {
                "shard0000" : {
                        "host" : "localhost:30001",
                        "stages" : [
                                {
                                        "$cursor" : {
                                                "query" : {

                                                },
                                                "indexOnly" : false,
                                                "cursorType" : "BasicCursor"
                                        }
                                }
                        ]
                }
        },
        "ok" : 1
}

Explain after:

mongos> db.runCommand({aggregate:'foo', explain:true, pipeline: [{$sort: {_id:1}}]})
{
        "splitPipeline" : {
                "shardsPart" : [
                        {
                                "$sort" : {
                                        "sortKey" : {
                                                "_id" : 1
                                        }
                                }
                        }
                ],
                "mergerPart" : [
                        {
                                "$sort" : {
                                        "sortKey" : {
                                                "_id" : 1
                                        },
                                        "mergePresorted" : true
                                }
                        }
                ]
        },
        "shards" : {
                "shard0000" : {
                        "host" : "localhost:30001",
                        "stages" : [
                                {
                                        "$cursor" : {
                                                "query" : {

                                                },
                                                "sort" : {
                                                        "_id" : 1
                                                },
                                                "indexOnly" : false,
                                                "cursorType" : "BtreeCursor _id_"
                                        }
                                }
                        ]
                }
        },
        "ok" : 1
}
Rename SplittableDocumentSource::getRouterSource to getMergeSource

In 2.6 it won't run in mongos any more so it became a misnomer.
Allow agg Expressions to have differing serializations and explains

Currently only used by ExpressionCoerceToBool which can't be parsed directly so it serializes as an
$and which then optimizes to $coerceToBool.
DocumentSourceGroup should optimize its Expressions
Clean up ExpressionCompare
Remove unused step and nRowsOut members from DocumentSource
Get rid of DocumentSourceFilterBase

Since we removed DocumentSourceFilter it is only inherited by DocumentSourceMatch.