3.0 issue 4454

Fixes #4454

This fixes a problem where using duplicate aliases in the joinable
associations chain would end up confusing the ResultSet groupResult
method. The problem cause was that EagerLoader assumed that collision
would occur in certain order.

Instead of relying on the order, a collisions map is generated and
then traversed so that fetching strategies can be corrected. A downside
of this is that it relies on keeping references to arrays.

A future enhancement to this fix would be to convert the arrays to objects
so that the reference handling happen implicitly.
That is a pile of indentation. Would having an object hold the map help fix this?