Bug 11277: fix errors with search facet links in Bootstrap theme

This patch fixes the following rwo errors:

  1. When selecting 'show more' above a facet, the advanced search page
     is displayed.
  2. When restricting search on a library facet, all the biblio records
     of this library are returned.

The patch fixes the way URL are encoded with TT filter. See:

http://search.cpan.org/~abw/Template-Toolkit-2.25/lib/Template/Manual/Filters.pod#url

Signed-off-by: Liz Rea <liz@catalyst.net.nz>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch works nicely. Tests done:
- 'More' link on facets redirects to advanced search before applying
  the patch. After appyling the link works correctly.
- In my tests, the facet links themselves worked nicely, limiting the
  search as expected.
- Availability search works ok for me with patch applied.
- Also made sure to click on some links containing diacritcts (German
  umlauts).

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4e64ea8870cca3715f838ae3b577cb05da2f7879)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 11249: Add Db indexes on borrowers names

The borrowers search is by default on columns surname, firstname,
othernames and cardnumber.

(See C4::Members::_express_member_find).

Adding DB indexes will really increase the query speed.

This patch adds DB indexes on surname, firstname, othernames (cardnumber
has already an index).

Those indexes must be defined with a size because columns are mediumtext.

Test plan :
Test with mysql client :
mysql> explain select * from borrowers where surname like 'A%';
+----+-------------+-----------+-------+---------------+-------------+---------+------+------+-------------+
| id | select_type | table     | type  | possible_keys | key         | key_len | ref  | rows | Extra       |
+----+-------------+-----------+-------+---------------+-------------+---------+------+------+-------------+
|  1 | SIMPLE      | borrowers | range | surname_idx   | surname_idx | 767     | NULL |  395 | Using where |
+----+-------------+-----------+-------+---------------+-------------+---------+------+------+-------------+
=> key show the index is used

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, changes from updatedatabase and in kohastructure match.
I think deletedborrowers can be left out, as it's not queried when doing
patron searches. Patron deletes still work as expected.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 19b5c9b4cecf935c1cf17649796debe80ae7b3a8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 11249: DBRev 3.14.02.001

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>