Small tweaks to validation.
Allow primary keys to be defined in the schema itself, not just in create_table. Fixes #1.