CORE-5386 Refactor exec-sql-statement in schema conversion.

This function can now take any number of string arguments, instead of just 1.
CORE-5386 Moved foreign key constraints into 99_constraints.sql