errorlib: fix Sentry context syntax issue

* Fixes Python syntax issue that slipped in the Sentry context support
  commit d73bd94b2fbe8666af31dfec25c334c466e6f6df.
  (addresses #1960) (PR #2147)

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
BibCheck: new ticket creation policies

* Adds the `--ticket-creation-policy` option which can be either
  `per-rule`, `per-record`, `per-rule-per-record` or `no-tickets`. These
  control how tickets are dispatched, if at all.  `--no-tickets` is
  preserved for backwards compatibility.
  (closes #2383)

* Turns `errors`, `amendments` and `warnings` of records into instances of
  the new `Issue` class. This allows for a more coherent way of storing and
  extracting this information.

* Changes the call to `BIBCATALOG_SYSTEM.ticket_submit` to pass recordid
  only if the ticket concerns a single record.

* Replaces hard-coded value with `CFG_SITE_RECORD`.

* Discourages editing of `record.errors`, `record.amendments` and
  `record.warnings` by prepending them with `_`.

* Fixes a typo in a comment.