WebSearch: better cleaning of word patterns

* Cleans word patterns of any trailing punctuation signs if they are
  followed by at least one space.  This is done for better consistency
  with what the indexer component does.

Reported-by: Alexander Wagner <a.wagner@fz-juelich.de>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>