Renamed ts-load to ca-load

More data formats are going to be added to this program.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Remove ts-extract and ts-merge

The functionality of ts-extract now exists in ca-shell.  The functionality of
ts-merge is being substituted with "sort" from GNU coreutils.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Renamed ts-load to ca-load (part 2)

Some changes were missing from the previous commit.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Added run-length encoding functions

These will be used to better compress uint/float tuples.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Remove TIME_FLOAT4 as a separate data type, and use OFFSET_SCORE instead

A compression scheme named CA_OFFSET_SCORE_FLEXI was implemented to accomodate
data with the characteristics of time series as well as inverted indexes.  Both
types of data are sorted by their offsets (in time or on disk), and thus lend
themselves to delta representations.

Techniques for storing offset deltas include:

 1) Find the GCD of all deltas, store the GCD ones and divide all deltas by
    that value.  For example, if all offsets are aligned to 4096 bytes, the
    value "4096" will be stored as "1", "8192" as 2, and so on.

 2) Find the smallest delta, store it once and subtract that value from all
    other deltas.

 3) If the deltas are range-bound to 0..15, use one nibble per delta.
    Similarly use 1 byte or 16 bits for larger ranges.

 4) Use byte-level run-length encoding for deltas stored in nibbles or bytes.

Techniques for storing 32 bit IEEE 754 scores include:

 1) If all values are integral, store them as 8, 16 or 24 bit integers.

 2) Find the smallest score, store it once and subtract that value from all
    other scores.  This reduces the need for full 24 bit integers.

In general, it seems that our best bet for losslessly compressing IEEE 754
values is to analyze them, detect that they're generated from a smaller domain,
and then store a conversion function and the input values to that function.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
ca-load: Set TZ to "" to prevent libc from doing time zone conversion

It doesn't befit data processing tools to grab time zone information from the
execution environment.  If no time zone is given in a date string, UTC should
be assumed.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>