fix bug where LIMIT/OFFSET were applied before distinct now they are applied last closes MB-8697
fix bug where LIMIT/OFFSET were applied before distinct
now they are applied last
closes MB-8697

couchbaselabs/tuqtng,couchbaselabs/tuqtng,couchbaselabs/tuqtng