debuginfo: Fixed option-like-enum test case so it does not rely on undefined behavior.
debuginfo: Generate template type parameters for generic functions.

Conflicts:
	src/librustc/lib/llvm.rs
	src/librustc/middle/trans/debuginfo.rs
	src/rustllvm/RustWrapper.cpp
	src/rustllvm/rustllvm.def.in
debuginfo: Properly handle monomorphization of generic functions.
debuginfo: Added test cases for generic structs and enums.

Also, always set no_monomorphic_collapse flags if debuginfo is generated.
debuginfo: Fixed crash occuring for parameterless closures.
debuginfo: Added support for self parameter in methods.
debuginfo: Added test cases for methods on structs, enums, traits, and tuple-structs.

Also new test cases for tuple structs and by-value parameter passing.
debuginfo: Implemented support for Self type parameter in trait methods with default implementation.
debuginfo: Add test case for issue #8513.
debuginfo: Support for combinations of Self type and type parameters.
debuginfo: Test cases for [generic][default][static] methods and functions:

* closure-in-generic-function
* generic-functions-nested
* generic-method-on-generic-struct
* generic-trait-generic-static-default-method
* method-on-generic-struct
* self-in-generic-default-method
* trait-generic-static-default-method

Also, fixed an 'unused variable' warning in debuginfo.rs
debuginfo: Added test cases for static struct and enum methods.
auto merge of #8554 : michaelwoerister/rust/generics, r=brson

This pull request includes support for generic functions and self arguments in methods, and combinations thereof. This also encompasses any kind of trait methods, regular and static, with and without default implementation. The implementation is backed up by a felt ton of test cases `:)`

This is a very important step towards being able to compile larger programs with debug info, since practically any generic function caused an ICE before.

One point worth discussing is that activating debug info now automatically (and silently) sets the `no_monomorphic_collapse` flag. Otherwise debug info would show wrong type names in all but one instance of the monomorphized function.

Another thing to note is that the handling of generic types does not strictly follow the DWARF specification. That is, variables with type `T` (where `T=int`) are described as having type `int` and not as having type `T`. In other words, we are losing information whether a variable has been declared with a type parameter as its type. In practice this should not make much of difference though since the concrete type is mostly what one is interested in. I'll post an issue later so this won't be forgotten.

Also included are a number of bug fixes:
* Closes #1758
* Closes #8513
* Closes #8443
* Fixes handling of field names in tuple structs
* Fixes and re-enables test case for option-like enums that relied on undefined behavior before
* Closes #1339 (should have been closed a while ago)

Cheers,
Michael