Fixes essence model associations
Refactors essence#acts_as_essence? method and adds spec.
Refactors uniqueness validation of essences. Fixes #467

The uniqueness validation indicates duplicates of essence ingredients. The strategy to indicate them was not strict enough:

Every essence of the same type with the same ingredient was handled as a duplicate. But indicating essence duplicates also depend on their related elements. So this commit adds more rules to the indication strategy:

A duplicate of an essence is now indicated if its ingredient is the same, the essence type is the same AND:

* its related element has the same element name
* its related element is neither trashed, nor unpublic

Also added: Essences only gets validated for uniqueness if they are public. (The essence is public if its element is public.)