Do not add enums to prototype scope in C++ modes.

The language forbids defining enums in prototypes, so this check is normally
redundant, but if an enum is defined during template instantiation it should
not be added to the prototype scope.

While at it, clean up the code that deals with tag definitions in prototype
scope and expand the visibility warning to cover the case where an anonymous
enum is defined.

Differential Revision: http://llvm-reviews.chandlerc.com/D2742