finished support for foreign keys for postgres: added missing removeForeignKey function; fixed and completed tests