This patch abstracts PostingList interface and reuses existing implementation. It will be used later to test different PostingList representations.
No functionality change is introduced, this patch is mostly refactoring so that the following patches could focus on functionality while not being too hard to review.
nit: InvertedIndex[TokenToPostingList.first] = buildSparsePostingList(...) ?