Rewrite input layer to stream the input one packet at a time, skipping
not needed packet types.

Rewrite query execution to take advantage of streaming input. Rewrite
group by and aggregation to use a hash table rather than sorting the
input.

Add support for hidden columns (in the result set but not in the
output) and straighten out some of the oddities in the evaluation
handling - row indices are now used rather than storing a pointer to
the input row on the output row, and aggregate functions store their
intermediate results on the row rather than in the evaluation tree,
and have a special path for evaluation.

On a 27 MB input file with a group by clause, the above saves around
90% memory and executes faster (spends <85% of the time).

Pull json.cpp and json.h out of the compilation. Reading JSON tables
appears to have been defunct for some time. Reviving this would entail
rewriting it to support the streaming interface.

Compatibility changes:

- Queries relying on access to columns that are not in the output in
"having" and "order by" clauses will now return an error. This may
have been useful for order by and could possibly be amended in the
future by copying the input column as a hidden column.

- Aggregation on an empty input now returns an empty output instead of
an error.