ds,RMQ: speedup query time

RMQ query time is now O(log(log(n))+log(range length))