debuginfo: Fix issue #11083 and some minor clean up.
debuginfo: Add test case for recursive enum types (issue #11083)
auto merge of #11274 : michaelwoerister/rust/issue11083, r=pcwalton

This pull request fixes #11083. The problem was that recursive type definitions were not properly handled for enum types, leading to problems with LLVM's metadata "uniquing". This bug has already been fixed for struct types some time ago (#9658) but I seem to have forgotten about enums back then. I added the offending code from issue #11083 as a test case.