OAIRepository: print_record() fixes

* Fixes the print_record() API to always return at least an empty
  string in case of errors, since its result is usually sent
  to req.write().  (closes #1200)
OAIRepository: Edit OAI Set page bug fix

* Fixes a typo in the SQL query in oai_repository_admin.modify_oai_set()
  that was rendering the "Edit OAI Set" admin page broken.
BatchUploader: error reporting improvements

* Improves error reporting about not authorised user-agent.
Merge branch 'maint-1.0' into maint-1.1

* maint-1.0:
  BatchUploader: error reporting improvements

Conflicts:
	modules/bibupload/lib/batchuploader_engine.py
OAIRepository: fix for OAI set editing

* Adds missing argument to a function call that was causing troubles
  with editing OAI sets via OAI Repository Admin.
WebSubmit: display login link on /submit page

* Suggests guest users to login when visiting the submission
  home page in order to display all submissions they have
  access to.
Merge branch 'maint-1.1'

* maint-1.1:
  WebSubmit: display login link on /submit page
  OAIRepository: fix for OAI set editing
  BatchUploader: error reporting improvements
  OAIRepository: Edit OAI Set page bug fix
  OAIRepository: print_record() fixes
WebSession: fix for merge_usera_into_userb()

* Fixes a corner case in merge_usera_into_userb() usage where
  a user could have been "merged with himself" when his known email
  was stored in the database with upper and lower case characters.

* Introduces un upgrade recipe to make all the email addresses stored
  in the DB lower case.

* Disables merging for rnkPAGEVIEWS, rnkDOWNLOADS, and session tables
  since these are usually huge and they are not really critical
  from the point of view of record merging.

* Disables locking of affected tables upon merging, at the very low
  risk of inconsistencies, but without the risk of locking up
  the service.
Merge branch 'maint-1.1'

* maint-1.1:
  WebSession: fix for merge_usera_into_userb()
pluginutils: fix for failing bibformat test case

* Fixes broken test case caused by 'dummy_' variable prefix
  which made the pluginbuilder's function-signature incompatible
  with the bibformat elements.
BibFormat: relator code filter in bfe_authors

* Adds relator_code_pattern attribute to BFE_AUTHORS
  which allows filtering authors based on value in
  the relator code (subfield 4). Allows printing of
  e.g. only thesis supervisors.
mailutils: authentication and TLS support

* Adds support for SMTP authentication and TLS when sending
  emails (via the config variables CFG_MISCUTIL_SMTP_USER,
  CFG_MISCUTIL_SMTP_PASS and CFG_MISCUTIL_SMTP_TLS).
installation: mark upgrade recipes as applied

* Fixes an issue where a fresh installation would have
  reported pending upgrades to apply.
Merge branch 'maint-1.1'

* maint-1.1:
  mailutils: authentication and TLS support
  BibFormat: relator code filter in bfe_authors
  pluginutils: fix for failing bibformat test case
Merge branch 'maint-1.1'

* maint-1.1:
  installation: mark upgrade recipes as applied
installation: aidUSERINPUTLOG consistency upgrade

* Developers using non-point-release versions of Invenio prior to
  integration of Invenio Upgrader may have ignored an important warning
  hidden between many other warnings. This upgrade recipe will check
  aidUSERINPUTLOG and ensure it is in the desired state.
Merge branch 'maint-1.1'

* maint-1.1:
  installation: aidUSERINPUTLOG consistency upgrade

Conflicts:
	modules/miscutil/sql/tabcreate.sql
installation: strip spaces in CFG list values

* Disregard leading or trailing whitespace in CFG list values, i.e. in
  values defined as comma-separated strings.  Example: CFG_SITE_LANGS
  with values `en,fr` and `en, fr` are now equivalent.
Merge branch 'maint-1.1'

* maint-1.1:
  installation: strip spaces in CFG list values
BibFormat: clean Default_HTML_meta template

* Removes use of non-existing 'protocol' parameter when calling
  format elements BFE_META_OPENGRAPH_VIDEO and
  BFE_META_OPENGRAPH_IMAGE. Thanks to Theodoros Theodoropoulos
  for reporting the problem.