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 don't really follow this - `pit` is never used except to determine the number of iterations of the inner loop.

If the intention is to calculate the length of the position list (as this code actuallly does), then just add it in one go rather than incrementing it through every intermediate value, i.e. replace the inner loop with just:

```
queryterms[*it] = it.positionlist_count();
```