introduce is? method for logictype and use it.

Conflicts:
	app/controllers/entities_controller.rb
	app/models/ontology/entities.rb
	app/views/entities/index.html.haml
fix logic.name pitfalls (by using to_s).
fix logic==nil problematic for parsing callbacks.
Merge pull request #510 from ontohub/484-nil_handling_for_logics

484 nil handling for logics
Merge branch 'staging' into staging.ontohub.org