Refactor SimhashINdex to support arbitrary bit length.