Generate sub/super classes. rdf_reachable/3 considers the
rdfs:subPropertyOf relation as well as cycles. Note that by
definition all classes are subclass of rdfs:Resource, a case
which is dealt with by the 1st and 3th clauses :-(
According to production 2.4 "rdfs:Datatype", Each instance of
rdfs:Datatype is a subclass of rdfs:Literal.