Prevent duplicate entries in tables

Added the DISTINCT keyword to the SPARQL queries, so that every class/property is
reported only once from the triple store. Previously, if two ontologies contained declarations for
the same class or property, it would be stored twice in the tables and also show up twice in the pb
interface.