fixes #537 Do not build unique indexes using the hot indexer
fixes #533 Fix a comical type-cast bug originally authored by yours truly
SERVER-3104 Allow intersection of sibling multikey index field ranges having a shared $elemMatch parent.

Conflicts:

	src/mongo/db/queryutil.cpp
	src/mongo/db/queryutil.h
SERVER-3104 Test index bound improvements for elemMatch query on multikey index
refs #279

SERVER-340 Created a $setOnInsert update operator.

Conflicts:

	src/mongo/db/ops/update_internal.cpp
refs #279

SERVER-340 $setOnInsert should be a no-op in an update.

Conflicts:

	src/mongo/db/ops/update.cpp
	src/mongo/db/ops/update_internal.cpp
refs #279

Manually port over a test for $setOnInsert
refs #279

SERVER-8640 Fixed $setOnInsert over a field created by the query portion of an upsert.
refs #279

SERVER-8640 Took $setOnInsert test out of the sharding passthrough suite.

Conflicts:

	jstests/slowNightly/sharding_passthrough.js
refs #279

SERVER-8680 $setOnInsert should not create an empty parent object when it should be a no op
refs #279 Some fixes to bad parts of the cherry-pick got lost in the final rebase
before pushing to master. Here they are.
refs #544 SERVER-4161 Convert ResponseBuildStrategy::handleMatch() arguments to meet coding standards.

Conflicts:

	src/mongo/db/ops/query.cpp
refs #544 SERVER-4161 Add ResultDetails struct for candidate result document retrieval metadata.

Conflicts:

	src/mongo/db/ops/query.cpp
	src/mongo/db/ops/query.h
refs #544 SERVER-4161 Report nscannedObjects properly when covered indexes are used.

Conflicts:

	src/mongo/db/ops/query.cpp
	src/mongo/db/queryoptimizercursorimpl.cpp
refs #544 SERVER-5858 temporary fix so hashed indexes work with $in queries

Conflicts:

	src/mongo/db/queryoptimizer.cpp
refs #544 SERVER-4669 Refactoring
- Collapse QueryOp and QueryOptimizerCursorOp into QueryPlanRunner.
- Move QueryPlanSet::Runner to QueryPlanRunnerQueue.
- Move QueryOptimizerCursorImpl class definition to header file.

Conflicts:

	src/mongo/db/queryoptimizer.cpp
	src/mongo/db/queryoptimizer.h
	src/mongo/db/queryoptimizercursorimpl.cpp
	src/mongo/db/queryoptimizercursorimpl.h
	src/mongo/dbtests/queryoptimizercursortests.cpp
refs #544 Move ElapsedTracker to mongo/util/elapsed_tracker.{h,cpp}.

Conflicts:

	src/mongo/SConscript
	src/mongo/db/clientcursor.h
	src/mongo/db/oplog.cpp
	src/mongo/s/d_migrate.cpp
refs #544 SERVER-5848 determine index suitability using a FieldRangeSet

Previously each special index type would determine the suitability
of the index by analyzing the original query.  To avoid re-parsing
the query for each index, we now pass in a FieldRangeSet, which is
a better representation of all the constraints implied by the query.

Conflicts:

	src/mongo/db/geo/2d.cpp
	src/mongo/db/geo/s2index.cpp
	src/mongo/db/hashindex.cpp
	src/mongo/db/hashindex.h
	src/mongo/db/indexkey.cpp
	src/mongo/db/indexkey.h
	src/mongo/db/queryoptimizer.cpp
refs #544 SERVER-5848 ammend c++ unit tests for new suitability method

Conflicts:

	src/mongo/dbtests/namespacetests.cpp
refs #544 SERVER-5848 further simplifications to default suitability() method

Conflicts:

	src/mongo/db/indexkey.cpp