Fix foreign keys loading for the SQL Server database schema parser

Hi,
I recently tried to use reverse command for existing MSSQL databases, but I got a lot of foreign keys referring/mapping to wrong columns, especially when a foreign key has multiple columns in it.
The problem comes from incomplete sql query used to retrieve MSSQL foreign keys.
Thix fix also includes fix for bug #910