generalize Search implementation (Fixes #416)

Implement Search for arbitrary string arguments (not just constant string
patterns). Also implemented Search in JS for use outside filtering.

All query expressions typed as constants are now inlined in the logical plan.

Add additional cases to `WorkflowBuilder.merge` to avoid calling
`toCollectionBuilder`, resulting in dramatically flattened $simpleMaps
and $projects in many cases. We should not be creating any nested temp
objects at this point, unless I missed something. Note: this makes it
much easier to spot redundant projections (projecting the same value
under more than one temp name). We'll want to get rid of these (see #474).
It's tricky because one is `JsCore` and the other is `Js`, and there are two embedded expressions. I think the best way to make it happen would be to convert the JsExprPhase to JsCore, which is probably a good idea (and looks feasible), but not something I wanted to take on in this PR.

Actually, I was not able to get the JsExprPhase's code to be used. I assume it would be used in a `$where` selector, if we generated one, but everything I try generates a $simpleMap followed by a $match. Am I missing something?