SERVER-137963In Code Review
Use field metadata from the dependency graph when producing type
getType should incorporate information from the field metadata: * canFieldBeArray (removes array) * knownToBeMissing (intersects missing) * hasConstant (gives the type) {$set: \{a: 1}} -> type int (hasConstant) {$project: \{a: 0}} -> type missing (knownToBeMissing)