table-backend-log.c: Fix "invalid map pointer" logic

 * t->read_map was assigned to MAP_FAILED in a weird place
 * We now instead use t->read_map_size to determine whether t->read_map is a
   valid map

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
tests/log-sort-00.c: Extend test to read data that was just written

This will help debug errors that happen before sorting.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Added the global transaction ID variable, ca_xid.

This will be used in so many places that it's not worth it to require a
function call for each use.  There can only be one active transaction per
process.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Added the "flex" table backend, with MVCC support

Thanks to MVCC, this backend supports DELETE operations.  Combined, with
INSERT, this allows UPDATE to be implemented as well, although at a higher
abstraction level.

Furthermore, this is the first backend that cannot be concurrently written to
by multiple processes.  For example, inserting into the tables performs an
lseek followed by a write.  The plan is to use explicit locking to prevent
corruption.

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