Fix instantiation problem in ERRest when the destination entity of a relationship is abstract

This commit fix a problem when the destination entity of a toOne or a toMany relationship is abstract. Instead of trying to create an instance of the abstract class (which causes an error), ERRest will try to create an instance based on the type attribute.