Fix issue when deserializing binary values from Hive

The code was incorrectly getting the raw underlying byte array from BytesWritable
Record "started" counter for queries that fail to parse

In the last release we started tracking parsing failures for error categorization,
but the change was missing the call to increment the started counter.

As a result, the started and completed counters get permanently out of sync
and cause the number of running queries to be reported as 0.
Improve unit tests for approximate aggregations
Add closed form approximate COUNT aggregation
Add closed form approximate SUM aggregation
Improve performance when computing partitions domain summary

This brings down the computation time from 70s (for 12k partitions) down to 250ms on my mac.
The previous algorithm was O(N^2) on the number of partitions times some non-obvious factor due
to how SortedRangeSet.union is implemented. There's still some room for improvement there.
Categorize user errors

* Categorize a bunch of illegal argument exceptions as user errors
* Categorize division by zero as a user error
Rename HadoopApiStats and move it out of util package
Add DirectoryLister interface