Add specifications for the richness of information

Since the implementation of the richness of information detail view
raised my suspicion about its proper implementation I have started to
add tests.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Refactor the term frequency methods

I have applied some refactoring to the term frequency method of the
richness of information metric in order to make it easier to test.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>