refactor tarjan tree according to style-guide

Also objectify the class.
use SQL to fetch valid sentences for Tarjan Tree.
adjust tarjan tree uses across project

Use .for instead of .new.
remove invalid ontology_id/name constraint

Names in entity_groups are not unique.