limit & offset workaround for SQL Server, fixes #671

Here a solid and short solution to #671, #670.
Works for both, MS SQL Server 2008 and 2012. 
Even works with setting only `limit` or only `offset` option. 
Thanks @binarygeotech