MsSqlPlatform - doModifyLimitQuery() generates incorrect SELECT query when using SELECT DISTINCT

On MSSQL platform the correct syntax is SELECT DISTINCT TOP ... , the current implementation of doModifyLimitQuery() ignores the DISTINCT keyword which results in the incorrect query - ie SELECT TOP DISTINCT ...

I have added a check for the DISTINCT keyword which corrects this issue