[ticket/10423] Remove * from search or highlight string

PHPBB3-10423
[ticket/10423] Move code into a function and add tests for it

PHPBB3-10423
[ticket/10423] Match multiple wildcards

Multiple wildcards are removed from the string if there is
no word before or after them. If there is a word before or
after them, they are just replaced with a single one.

PHPBB3-10423
[ticket/10423] Remove unnecessary include in test

PHPBB3-10423
[ticket/10423] Replace foreach with function in viewtopic.php

PHPBB3-10423
Merge pull request #2195 from Elsensee/ticket/10423

[ticket/10423] Remove * from search or highlight string

* Elsensee/ticket/10423:
  [ticket/10423] Replace foreach with function in viewtopic.php
  [ticket/10423] Remove unnecessary include in test
  [ticket/10423] Match multiple wildcards
  [ticket/10423] Move code into a function and add tests for it
  [ticket/10423] Remove * from search or highlight string
[ticket/12397] Fix sql_unique_index_exists doc block

db_tools::sql_unique_index_exists() searches for unique indexes but not
primary key indexes.

PHPBB3-12397
Merge pull request #2310 from n-aleha/ticket/12397

[ticket/12397] Fix sql_unique_index_exists doc block

* n-aleha/ticket/12397:
  [ticket/12397] Fix sql_unique_index_exists doc block