DATACMNS-511 - AbstractMappingContext.addPersistentEntity causes infinite loop.

In order to avoid infinite loops and unnecessary mapping checks we perform a more elaborate check in order to test whether an given TypeInformation represents an already persistent entity.

Note that we cannot use persistentEntities.contains(candidate) here since the VariableTypeInformation also uses the information about he owing type in hashcode / equals which could be different depending on the declaration of the type although it points to the same entity.

Note since this is difficult to test one can reproduce the problem by running the example provided in the ticket.

Original pull request: #84.