Under C++ core issue 39, the rules for class-scope name lookup were reworked so
that name lookup no longer concerns itself with whether the names were found in
an ambiguous subobject. The checks for an ambiguous subobject are now done as
part of conversion of the object argument in a member access (if needed)
One other important consequence of the new lookup rule is that it's now OK to
find different lookup results in multiple different classes, so long as the
same set of entities is found in each case (in any order, perhaps with
duplicates, and in the type case, perhaps via unrelated typedef declarations).
This patch implements the new lookup rule. This also has some follow-on impact
on access checks: it's now OK for name lookup to find different member
declarations in different base classes so long as they all resolve to the same
set of entities, so we now need to compute what the corresponding found
declaration is, and access-check it, for each path independently.