template: Flask 1.0 compatibility fix

* Fixes return value of Jinja loader iteration due to change in
  Flask 1.0. (closes #2216)

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
BibClassify: case insensitive taxonomy

* Fixes a bug where the look-up of ontology names from the
  taxonomies were forced to lower case.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
BibClassify: PEP8 and PEP257 fix

* Improves PEP8 and PEP257 across ontology_reader.

* Removes any rdflib checks which is no longer needed as this
  library is (1) mandatory and (2) mandatory at a high version.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
BibClassify: error handling and PEP8

* Adds a new exception type TaxonomyError when there is a problem
  reading the ontology passed to legacy BibClassify.

* Performs some PEP8 fixes across ontology_reader.py and engine.py.

Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>