Reorganized code to reduce length of select.c

select.c should only contain code specific to SELECT statements.  It shares
expression evaluation with INSERT, DELETE and UPDATE, so those should go in
separate files.

Furthermore, code for different output formats (JSON, CSV, ...) should go in
one file per format.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
.gitignore: Ignore /ca-table-lockd

ca-table-lockd is a generated binary.

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