Fix infinite loop in unit of work on bidirectional references with discriminator maps
Inline UoW::addDependencies() and make consistent with ORM

Replacing the recursion with the inline version used by ORM. The continue logic is changed slightly to allow any owning side associations (all embedded relations are owning side) that have a target class defined. We also replace the recursive call with an additional append to $newNodes after adding the class to the CommitOrderCalculator (this was previously done when adding sub-classes but never after adding the target class.

This implementation also fixes the bidirectional inheritance test and infinite loop discussed in #693.
Remove obsolete UoW::addDependencies() method