Assemble sort keys into an array, and pick them out, each with correct orderType

Fixes many cases, including the example given in #107.

Many other queries currently trip up the planner, including when filtering is present; see the pending tests included in this PR.
I think that's correct. We need to test the domain of valid logical plans rather than the subset of logical plans emitted by the current compiler.