Fix rank-query

Implement a O(n) precomputed lookup table on a bit vector to
compute rank queries faster.