add functionality to determine sql query cost.
don't display graphs-link if the cost is too high

- Currently this uses a cost of 500 as "too high"
  We do not know if this is actually a sane value.
fix resource chain for logics.
Use DISTINCT to optimize expensive sql-queries.
Merge branch 'git' into correcting271_use_explain_for_complex_sql

Conflicts:
	app/controllers/application_controller.rb
	lib/graph_data_fetcher.rb
Merge pull request #302 from ontohub/correcting271_use_explain_for_complex_sql

Correcting271 use explain for complex sql
fix seeds: child ontologies don't have an own raw file
Merge branch 'git' of github.com:ontohub/ontohub into git
Merge pull request #317 from ontohub/correcting306_position_of_graph_info

Merge pull request #317 from ontohub/correcting306_position_of_graph_info
We need git-svn on travis for testing of the git branch and the further releases.
Fix the issue of incorrect Ont.-Version creation.
Fix Number of affected Ontologiesdisplay

use `size` instead of `count`.
Fix error which resulted in unsaved ontologies

When merging staging and git we commented ontology.save
out, which resulted in the logic-specific settings
(and probably more) not being saved.
Merge pull request #322 from ontohub/correcting293_too_few_ontologies_displayed

Correcting293 too few ontologies displayed
Merge branch 'git' into develop