SQL Server Paginator bug fix

This patch solves bug http://www.doctrine-project.org/jira/browse/DDC-2687
and takes inspiration from this PR https://github.com/doctrine/dbal/pull/374 which was written for this bug http://www.doctrine-project.org/jira/browse/DDC-2622