search: typeahead 0.10 adaptation

* Fixes typeahead in 'Add to search' form.

Signed-off-by: Kamil Neczaj <kamil.neczaj@cern.ch>
Reviewed-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
collection.html vars testss
pidstore: model relationship

* Adds SQLAlchemy model relationship to allow easy access to
  log message for a given persistent identifier.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
utils: persistentid 100% test coverage

* Increases test coverage of persistentid module to 100%.

* Removes duplicate code.

* Adds test cases for ISBN-10.

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

* Fixes PEP8 errors.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
sqlalchemy: JSON MySQL storage type fix

* Fixes issue with MySQL data type used by SQLAlchemy JSONType
  by changing the MySQL data type from TEXT to LONGTEXT. The
  TEXT data type supports only storage of 64k whereas LONGTEXT
  supports storage of 4gb.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
deposit: workflows reinitialization fix

* Fixes issues with workflow reinitialization after minor
  workflows refactoring.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
jsonalchemy: Versionable test addition

* Fixes @connect decorator by adding implicit @parse_first
  rule for connected field.

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
annotations: api improvements

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
search: fix for dissapearing search field text

* Typeahead also stores its query internaly in a variable, and resets
  to it on blur event of the input field. The query is normally
  updated when the text is typed by user. Using javascript it needs to
  be updated manually.

Signed-off-by: Kamil Neczaj <kamil.neczaj@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Merge remote-tracking branch 'jiri/pu' into templates-collection