indexdata: read posting list iff all ng exist (#619)
The purpose of this commit is to reduce disk IO in case we skip a shard
because of missing ngrams.
To achieve this, we first check whether ALL ngrams exist in the shard before
loading the posting lists to determine their frequency. This means we have to
loop twice over the ngrams for the benefit of not loading any posting list in
case the shard would have been skipped anyways.
Test plan: This is a refactor, so relying on CI