Before converting a Filter to Sargable node, try to push down UnaryOp
Not through PathGet. Ideally we can push it all the way down and
incorporate it into a leaf PathCompare: for example Not ... Lt -> Gte.
The main change is to allow paths like Traverse (ComposeM ...) to
be Sargable. We add a Traverse to each conjunct as if the original
path were ComposeM (Traverse ...) (Traverse ...). This is an over-
approximation so we mark it perf-only and keep the original predicate.
A separate but related improvement: we now make use of more precise
index metadata to remove Traverse nodes. An index on a dotted path
such as {'a.b': 1} may have metadata telling us that 'b' is never
an array, even if 'a' is multikey.
Also, slightly improve lowerPartialSchemaRequirement's ability to
turn ranges back into PathArr / PathObj. This rewrite belongs in the
PartialSchemaReqLowerTransport so that we recognize these intervals
no matter where they occur in the BoolExpr.
Adds two new suites: query_golden_classic and query_golden_cqf, which
use the golden-data test framework (docs/golden_data_test_framework.md).
These suites diff the expected and actual output instead of using
assert.eq and similar functions.
This change includes some refactoring of the golden-test classes to avoid
pulling the unittest library into the mongo shell.