Initial code commit.

Will need some work on several functions, e.g. concat(), which sqlite
supports via the || operator, or any(), which sqlite does not support at
all.