Update for paginate_by_sql to support SQL Server

Updated the paginate_by_sql function to allow for SQL Server syntax.
This has been verified to work with activerecord-sqlserver-adapter
(3.0.19) but may require additional verification with later gem versions
(current is 3.2.11) or other SQL Server Adapters.