Merge branch '398-delete_ontology_button' into 701-delete_repository_error

Conflicts:
	app/views/ontologies/_menu.html.haml
allow ontology deletion if the repository is being deleted
put repo delete mark in class instance var
check if onto is imported externally when destroying
add tests for repository deletion
add translated sentence model.
add helper module for direct sql interaction.
add method to fetch directly imported ontologies.
add method to apply translation to sentence.
save current state of sentence translations.
catch ontology delete error when deleting a repository
Merge branch 'staging' into 701-delete_repository_error

Conflicts:
	app/views/ontologies/_menu.html.haml
Merge branch 'staging' into 676-translate_sentences
remove superfluous migration
fix entity mapping for correct find/create-update

The old code only created a new mapping if there
was no preexisting mapping.
No we create a new mapping unless an old one is found.
add entitymapping reference to translated sentence.
add implicit call to create translated sentences.
add methods for applicablity of translation.
add methods to fetch translated/combined sentences.
establish generation of translated sentences.