mailutils: fix for double mail sending issue

* Addresses problem with double send emails.  (addresses #1598)

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
WebSession: fix for login referer redirection

* Addes blacklist of links which should not be followed after login.
  (closes #1598)

Signed-off-by: Adrian Tudor Panescu <adrian.tudor.panescu@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
WebSearch: fix for cache timestamp file handling

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
BibFormat: port back-to-search links

 * Revives links displayed on the detailed
   view of a record to let users flip quickly
   between detailed record pages.

Conflicts:
	modules/bibformat/etc/templates/format_templates/Default_HTML_detailed.tpl
	modules/webstyle/css/invenio.css
WebSearch: jinja template for back-to-search links

 * Moves html output related to back-to-search links
   to a separate jinja template named
   "record_back_to_search_links.html".

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>

Conflicts:
	modules/bibformat/etc/templates/format_templates/Default_HTML_detailed.tpl
	modules/websearch/etc/templates/Makefile.am
WebSearch: back-to-search links improvements

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
BibFormat: get fulltext snippets docstring fix

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
WebStyle: fix blueprint loading refactoring issue

* Fixes an issue introduced during refactoring from pluginutils to
  importutils loading of blueprints.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
WebSession: email form validation addition

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
urlutils: fix for wrong URL arguments encoding

* Fixes issue with URLs being escaped twice.

* TODO usage of `make_canonical_urlargd` needs to be checked.

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
WebStyle: debug-toolbar display condition fix

* The Flask debug-toolbar is shown iff it is added in CFG_DEVEL_TOOLS and
  CFG_DEVEL_SITE == 9 (shown to ALL users), or the current user is super
  admin (regardless of CFG_DEVEL_SITE).

Signed-off-by: Adrian Tudor Panescu <adrian.tudor.panescu@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
initial

namespace packages

moved factory

dummy extensions

renaming

working after renaming

invenio.ext.login

loading config from invenio.config and invenio.cfg file

moved debug_toolbar and sslify to separate extensions

fix register extension on app object

invenio.ext.login

invenio.ext.sslify

factory improvements

invenio.ext.sqlalchemy

invenio.ext.sqlalchemy

fix UserInfo import

Factory: loading exensions' config

Factory: moved legacy and mailutils to extensions

Moved invenio.cfg and changed names of config variables

ignore extensions returning None

invenio.ext.jinja2hacks

moved jinja2hacks.py

jinja2utils -> invenio.ext.jinja2, invenio.ext.jinja2hacks

jinja2utils done

signalutils -> base.signals

adminutils -> ext.admin

invenio.hashutils -> invenio.utils.hash

utils in setup.py

adminutils fixes

jinja2 -> templates, legacy fixes

invenio.dateutils -> invenio.utils.date

invenio.jsonutils -> invenio.utils.json

invenio.memoiseutils -> invenio.utils.memoise

invenio.containerutils -> invenio.utils.container

invenio.logicutils -> invenio.utils.logic

mimetypeutils -> utils.mimetype

paginationutils -> utils.pagination

ext.gravatar initial commit

cache -> ext.cache

clean-up app factory

ext.template.context_processor initial commit

cache.py removed makefile

paginationutils.py removed makefile

template context_processor init

deprecated customize_app

session/__init__.py

moved InvenioRequest to ext.legacy.request:LegacyRequest

request -> request_class to avoid module confusion

hello world removal

invenio.base.helpers:with_app_context moved

logger extension

package modules discovery

sqlalchemy fix after merge
invenio.mailutils -> invenio.ext.email
invenio.mailutils_backend_adminonly ->
    .ext.email.backends.smtp_adminonly.Mail
    .ext.email.backends.console_adminonly.Mail
ext.template.bccache
importutils: lookup inside modules not filesystem
importutils: related name re pattern change
importutils: silent=ignore_exceptions
invenio.ext.session
session config moved
base.wrappers for url_for