limit & offset workaround for SQL Server, fixes #671
optimize code
Merge pull request #676 from ikkez/sqlsvr-mapper-limit

limit & offset workaround for SQL Server, fixes #671