schema.c: Avoid opening ca_catalog.ca_tables twice

We open the table once to read table names.  There's no need to open it again
when SHOW TABLES; is executed.

I noticed a problem while working on this; if the ca_catalog tables are
modified with UPDATE, they are not refreshed.  In the future, CREATE TABLE and
ALTER TABLE operations should map directly to INSERT and UPDATE statements, and
the in-memory copy should be updated accordingly.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Support simple UPDATE statements

To prevent dirty reads, changes are written to new files.  When the transaction
is committed, a new ca_catalog.ca_tables is written with the path names of the
new table files.  Because replacing ca_catalog.ca_tables is atomic, each client
will only see a snapshot.  Before the database can be considered ACID, the
following items must be attended to:

TODO: Allocate a global XID at the first moment data is being accessed within a
      transaction

TODO: Refresh schema cache when a XID is allocated

TODO: Remove old table files when the highest running XID is higher than the
      XID that removed the table file from the schema

TODO: Verify that a table is locked before updating it

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
query-parser.y: Make WITH (PATH = 'foo') optional

When no PATH is provided, a file name will be generated.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
lock.c: Corrected logic for checking response size

recvfrom returns the message size rather than updating the struct iovec passed
to it.

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