Fix unescaped ampersands in bookmark links

Fixes issue #322 where the ampersands in bookmark links were not being
escaped. This required a new filter which actually had some use in other
places that I found so I applied it to those to reduce code duplication.
Merge pull request #361 from awiddersheim/fix_escaping_ampersand_bookmarks

Fix unescaped ampersands in bookmark links
fixed urlencoding when using cookie auth
fixed exclude pattern when using logcache
fixed exclude pattern with pipes
make list of csrf_allowed_hosts configurable

instead of using fixed 127.0.0.1
updated docs
reports: added option to decide what happens if backends are not available during report generation