ca-table.h: Added #includes needed for "struct stat"

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
table-backend-writeonce.c: Report seeks out of table bounds

If the caller attempts to seek before the start or past the end of a table, an
error will be reported, and no seek occurs.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Support TIMESTAMP WITH TIME ZONE in query language

This corresponds to the CA_TYPE.  Sometime in the future the names of the C
enums should match the types used in the query language.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
query.c: Completed the functionality of ca_schema_query

The function can now be used for performing actual queries in the inverted
index, albeit only with a single keyword.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
select.c: Corrected array index for field type lookup

when doing exact primary key lookups, the formatter would use the type of
column 0 rather than column 1 to format the data of column 1.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Support the LIMIT clause on QUERY queries

This helps prevent dumping tens of thousands of items to struggling web browser
clients.

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