Fix deleteUnusedFields.

Previously, it could delete fields that were needed in the result or for a
map, etc. because we didn’t distinguish between an empty set meaning
“preserve all” and “preserve none”.
Handle sort keys directly.

Rather than using the WorkflowBuilders created from
MakeArray/ArrayConcat, use the upstream builder for each key,
eliminating many extra projections.