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).
We don't seem to be using `ValidationNel` in the query annotators, but here there are two arguments which can independently fail. This seems dumb. Is there a more intelligent way to handle it?

See the penultimate case below.