Remove the function parameter from `WorkflowBuilder.merge`.

The function parameter just applies the function to the final result of
merging. It is simpler to just return that result and be able to
map/flatMap over it afterward.
GroupBuilder can hold both a document and an in-progress field.
Implement ShapePreservingBuilder.

This allows for us to have aggregate fields in projection after a having
clause, which is a pretty common thing to want.

The one problem here is that we end up with `__tmp` fields in the final
projection, because we don’t currently track the schema well enough.