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).
The JsExprPhase version is probably _called_, but thrown away rather than used. It is extremely difficult (if not impossible) to generate a `$where` selector now (in future these will mostly (all?) be created by inlining some other op into the following `$match` during `Workflow.finish`). The one place we always use the JsExprPhase value is for the right side of the condition for a join – an interesting place to use `Search`.

But, for now … maybe add an issue for converting JsExprPhase to JsCore, and a TODO comment above the JsExprPhase version stating that it should share code with the WorkflowPhase version when that conversion happens.