Fixed NullPointerException in Searcher.termFrequencies().

Didn't check whether Weight.scorer() returned null (which it does when
there are no matches in a segment). Fixed same bug in
Searcher.deleteDocuments().