Added alternate query handler hooks for TDS---mostly pertaining to LIMIT and OFFSET.
Added a unit test to make sure LIMIT and OFFSET are playing together nice on TDS.