Fix error-hiding in query running (try/finally).

Real errors would be hidden by failure to close dataset.
Using null progress object instead of `if null` checks everywhere.
Query: Storing separate lists of filters for each thread.

Previously, these were flattened into one list during creation.
Now they are stored separately, so that all filters within a list
belong to the same thread. This is in preparation for adding reduce
functionality.
Query: added filter reduction method.

It doesn't do much yet: it just iterates over the filters, grouped
by node.
Query: Accumulated outputs can be folded (reduced) and returned as a map.

Filters can now accumulate values and return them at the end of
the query. Values are returned in a map, keyed by filter ID. If
the query is run with multiple threads, the computed metadata will
be folded together at the end so it looks like it was run single-
threaded. Outputs are returned as instances of the new class
Foldable, which means they could be further combined with other
results if running on a cluster.

Currently there is no way to specify the semantics of the output:
toString is the only uniformly-supported output interface of
Foldable.
Query: Added check for filter dimension definition.

Without this, confusing null exceptions were being thrown.
Added a filter that gathers the min and max values.
Query: Added mean and standard deviation to stats accumulator.

Using Knuth's algorithm for each thread, and Chan's for combining
multiple parts.
Query: added more interesting debug messages for output reduction.

Showing the output of individual parts in addition to the combined
(folded) output.
Query: Fixed stats folding method for small n.

Added rigorous test cases for statistics-gathering class.
Query: Moved Statistics class into rsaquery API.

Also added the statistics tests to AllTests.
Query: moved Stats classes into their own package.

This is in preparation of more stats-like classes being added.
Query: Added histogram class that splits statistical data into buckets.

Currently buckets are generated using an exponential formula. This
means that there is high resolution near zero, but it allows values
to be collected over a great range.

Only buckets are generated so far. Actual gathering of stats data
still needs to be implemented.
Query doc: updated histogram spreadsheet...
Query: Implemented histogram bucketing as a Foldable class.
Query: Split stats classes into scalar and vector types.

It's better this way, because now it's easier to compose results
in different ways - e.g. a vector Histogram can view its stats
objects by bucket *or* by component. This will eventually allow
the user to ask for a vector of stats objects for a given bucket.
Query: Converted histogram class to use buckets objects.

This way, users of the Hist class can easily tell the upper and
lower bounds of each bucket.
Query: Added stats class to group values by category.
Query: improvements for stats collection.

Histograms:
- Bucket is now a static class.
- Added bucket accessors.
- Added method to get all nonempty buckets from a histogram.
- Added method to get summary stats for whole histogram.
- Added tests.
Categories:
- Added methods to get histograms by category.
- Added tests.
Statistics:
- Fixed getMax method (used to return min!)
Query: An unbound input socket is now an error, not a warning.