Makesnippetqueryrelevant: display snippet showing the area surrounding the searched word / phrase text

Added the cosine similarity as an addition factor with weight.

To get the query term in the snippet. Attached is the image from local testing.

Most of the document seems to get the query word but few of them are still not able to get the query words, but snippet is picked from a location very close to the query word. needs a little more tunning of parameters for that i guess.

![2014-08-28-16 37 44-screenshot](https://cloud.githubusercontent.com/assets/1573133/4074644/e778e1a6-2ea3-11e4-94e6-9ed9f91c7fcc.png)

I'd like to understand why we're getting `0` out for these - it seems like this method isn't going to return meaningful results in such cases from what I can see of where those divisions happen.  When `rm_coll_size` is zero, that means that `term_info.coll_occurrence` will always be zero, and so `irrelevant_prob` will always be zero.  Similarly if `rm_total_weight` is 0, then `relevant_prob` will always be zero.

I had a look, and the test suite triggers `rm_coll_size` being 0, but not `rm_total_weight` being 0.  But it triggers it in both cases we test.  It looks to me like the issue is that the test cases index only stemmed terms, but without a `Z` prefix (`STEM_ALL`), but the snippet generator assumes that `STEM_SOME` was used for indexing.

If we do need to ensure these are never zero, it seems better to check them after they're calculated, and then ensure they aren't zero - changing the initial value means we'll get a different total in every case to currently.