table-backend-log.c: Fix incorrect call to ca_file_buffer_free

Instead of calling ca_file_buffer_free, ca_file_buffer_flush was being called.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
table-backend-flexi.c: Switch to buffered writing

It turns out you can memory-map file descriptors using PROT_WRITE even when the
file was opened with O_APPEND.  This means we get race-free file appends with
no explicit locking.  Using a buffer like this also means we don't have to
repeatedly call ftruncate and mremap during mass inserts.

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