bit_vector: Fix rank corner cases
wavelet: rank finally passes all tests