Drop Sorter name and use _.extend for prototype

Should be a no-op.
Key-based sort.

This rewrites the sorter to generate "keys" for each doc and find the
lexicographically minimum "key", rather than to look at each sort key
field separately.

This commit doesn't actually change the semantics (and the failing test
still fails) because the key generator actually still computes the full
cartesian product of all keys, rather than only using fields that are
next to each other in arrays.
XXX path-sensitive key generation

test passes now

but the code has some weird assumptions that at the very least should be
explained in this commit message and probably unit-tested