documents: set_content and resful API

* Adds new model and field definitions.

* NOTE: this is still work-in-progress.

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
jsonalchemy: versionable extension

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Co-authored-by: Esteban J. G. Gabancho <esteban.gabancho@cern.ch>
jsonalchemy: in memory engine addition

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
sqlalchemy: change JSON type to native one.

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
jsonalchemy: update `parser.py` for pyparsing 2

* Transform hardcoded decorators into extensions inside the parser
  folder. The new decorators are cataloged as `before`, `on` and `after`
  depending on when they should be evaluated.

* All the decorators that before needed always a tuple now works as
  `@decorator(*args)`.

* Remove `@inherit_from` decorator from field definitions as it is
  replaced by `@extend` and `@override`.

* New decorator extension added `@connect(field_name[, function])` to
  link to fields and propagate changes from one to the other and vice
  versa.

* Remove `include` form field definitions as now registries are used.

* Replace `checker` section by `schema` to perform simple validations,
  like type or length. For more complex check use the checker module.

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
jsonalchemy: add `jsonext` as common namespace

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
jsonalchemy: update readers and SmartJson

* Update all parsers to work with the new structutre of the field and
  model definitions, meaning using the extensions properly.

* When translating a new blob there is no need any more to go through
  the `readers` registry, instead call `Reader.translate`. See the
  method docs for more info.

* Update SmartJson to work also with new extensions and decorators
  structure.

* Update JSON for marc producer to adapt it to the new extension
  behavior.

* Add first version of sphinx documentation (to be completed).

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
records: update to new JSONAlchemy

* Add `persistent_identifier` property to the record base object.

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
documents: update field and model definitions

Signed-off-by: Esteban J. G. Gabancho <egabancho@gmail.com>
jsonalchemy: fix `six.iteritems` typo

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
documents: fix for model creation

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
jsonalchemy: import and PEP8 fixes

Co-authored-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
Signed-off-by: Adrian-Tudor Panescu <adrian.tudor.panescu@cern.ch>
jsonalchemy: UUID validation fix

Signed-off-by: Adrian-Tudor Panescu <adrian.tudor.panescu@cern.ch>
jsonalchemy: `uuid` and `objectid` validator fix

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
previewer: PDFtk previewer

Signed-off-by: Adrian-Tudor Panescu <adrian.tudor.panescu@cern.ch>
annotations: initial commit

* Allow annotating any page.

Signed-off-by: Adrian-Tudor Panescu <adrian.tudor.panescu@cern.ch>
annotations: file attachments skeleton

* Can be enabled via the ANNOTATIONS_ATTACHMENTS configuration
  parameter.

Signed-off-by: Adrian-Tudor Panescu <adrian.tudor.panescu@cern.ch>
annotations: record document annotations

* Add infrastructure for adding targeted notes on records (e.g., on pages,
figures).

Signed-off-by: Adrian-Tudor Panescu <adrian.tudor.panescu@cern.ch>
comments: annotations integration

* Integrates the record document annotations with the Invenio commenting
  facilities and PDFtk previewer.

Signed-off-by: Adrian-Tudor Panescu <adrian.tudor.panescu@cern.ch>
annotations: JSON-LD publishing

* Add JSON-LD publishing utilities for annotations and RESTful API helpers.

Signed-off-by: Adrian-Tudor Panescu <adrian.tudor.panescu@cern.ch>