Section 3.4.4 of the C++ standard states that a lookup for an
elaborated type specifier obeys the normal lookup rules except that
non-type names are ignored. In particular, the same name declared in
multiple namespaces nominated via using directives should result in
ambiguous lookups. This was not happening in cases where the class or
enumerator name was hidden in one namespace.
This patch fixes this by shifting the scope_binding type member into
the value member when the value member is ignored. It also removes
the select_decl function in preference to ambiguous_decl and cleans up
a few ambiguous reference error messages which were interfering with
the new tests.
Tested with a C/C++/Java bootstrap and testsuite on i686-pc-linux-gnu.