Word index reflects number of words

After new words are removed because they don't have sufficient occurrences in a
document, we reindex the word_id_dict.

fixes #1