Support for foreign keys in creating tables
Tests + fixes for attributesToSQL
Basic implementation of capturing foreign key status
Tidy up setting of new attributes
Topologically sorted iterator for DAOs taking dependencies into account
Create tables in dependency order
Support for dropping tables with constraints
Skeletal test
Fixes after rebase
Don't pretend like composite primary keys work: they need to be handled at table level, not attribute level
Factor FK constraint logic out into a helper function
Make cascade optional
Turn on foreign key checking for SQLite
Improve pragma handling for sqlite3
Improve test coverage for cascade deletion in postgres
Tests for delete cascade
Replaced underscore with lodash.
Test for update cascade and restrict
Minor updates following comments form @janmeier
Merge pull request #594 from durango/lodash

Replaced underscore with lodash.