deposit: deposition type refactoring

* Moves article deposition to demosite.

* Removes photo, poetry, preprint and thesis depositions.

* Fixes minor issues in templates.

* Fixes some PEP8 issues.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
deposit: record merge customization

* Adds option to override default merging of deposition into a record
  after editing.

* Renames variables to improve readability of merge_record task.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
deposit: SIP upload check improvement

* Adds method for checking if a record SIP has been uploaded.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
communities: pagination fix

* Ensures page variable is always a positive integer.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
BibUpload: legacy import fix

* Fixes wrong legacy import.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
BibKnowledge: translation string fix

* Fixes issue in translation string.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
formatter: BibTex Jinja2 format template

* Converts the old BibFormat template for BibTeX into a
  Jinja2 template.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
formatter: error pass-through

* Reraises any errors happening during formatting when in debug mode.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
records: bibupload timestamp fix

* Fixes an issue causing revision verifier to reject uploads. When
  bibupload inserts/updates records it sets hstRECORD.job_date=t1 and
  bibfmt.last_updated=t1 and bibrec.modification_date=t2
  (with t2 > t1). This is intended behavior in master (see #1431).

  Revision verifier checks 005 on upload against hstRECORD.job_date
  (i.e. t1). Records model was getting modification_date/005 from
  bibrec.modification_date (i.e. t2).

  Thus getting a record and trying to reupload it would get rejected,
  since the XML would have t2 in 005, which revision verifier would
  compares against t1 from hstRECORD.

  Modification date ought to be taken from bibrec.modification_date
  and all three timestamps ought to be the same. Thus below is a hack,
  that ought to be fixed in bibupload instead. Unfortunately so much
  other code is might rely on the current behavior that it's hard
  to change.

Co-authored-by: Esteban J. G. Gabancho <egabancho@gmail.com>
Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>