Add test for foreign key constraints
Tests on writers schema resets iterator every time
Parser now accepts schemas with FOREIGN KEY constraints