Fix infinite recursion on cyclic import structures.

If owl:imports iri declarations do not match the imported ontology IRI
and there is a cycle in the imports closure, the parsing goes into an
infinite recursion. Cycle broken by detecting the cycles on the
owl:imports IRIs rather than waiting for the ontologies to appear in 
the manager index.