query.c: Deal correctly with empty result sets

In particular, subtracting an empty result set should have no effect, rather
than causing the entire query to return nothing.  Also, make sure we print "[]"
if the combined result set is empty.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
query.c: Support date values in range expressions

Dates are converted to "days since UNIX epoch".  January 1st 1970 is day 0.
echo $(($(date +%s)/86400)) in base gives current day.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
query.c: Support the <=, = and >= range operators and dates

Example use is testing whether a document had an event happen on or before a
given date.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
query.c: Correctly handle zero matches for first keyword

Previously, the first keyword would be ignored if it had zero matches.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Merge branch 'master' of https://github.com/mortehu/cantera-table
tests/schema-00.c: Load schema before creating any tables

The schema code has recently been modified to not automatically load anything
at startup, to avoid needless I/O if the session does not need any.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
statement.c: Read schema before QUERY statements

No schema, no visible tables.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
table-write.c: Allocate exact amount needed for offset score arrays

Currently, this involves an (expensive) scan of the input array.

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