Some essence refactoring (mainly the uniqueness validation)

* Fixes essence model associations
* Refactors essence#acts_as_essence? method and adds spec (very tiny change)
* Refactors uniqueness validation of essences. Fixes #467 (more details in commit description)