Add parser for `#[repr(...)]`; nothing uses it yet.

Also export enum attrs into metadata, and add a convenient interface for
obtaining the repr hint from either a local or remote definition.
Initial implementation of enum discrimnant sizing.

Allows an enum with a discriminant to use any of the primitive integer
types to store it.  By default the smallest usable type is chosen, but
this can be overridden with an attribute: `#[repr(int)]` etc., or
`#[repr(C)]` to match the target's C ABI for the equivalent C enum.

This commit breaks a few things, due to transmutes that now no longer
match in size, or u8 enums being passed to C that expects int, or
reflection; later commits on this branch fix them.
Lint non-FFI-safe enums.
Fix multiple mistakes in adt::is_ffi_safe
Add repr attributes in various places that need them.
Check repr attribute consistency at check time, not translation.

Note that raising an error during trans doesn't stop the compile or cause
rustc to exit with a failure status, currently, so this is of more than
cosmetic importance.
Unbreak the debuginfo tests.

The variant used in debug-info/method-on-enum.rs had its layout changed
by the smaller discriminant, so that the `u32` no longer overlaps both
of the `u16`s, and thus the debugger is printing partially uninitialized
data when it prints the wrong variant.

Thus, the test runner is modified to accept wildcards (using a string
that should be unlikely to occur literally), to allow for this.
Assorted cleanups suggested by reviewers.
Yet more neatening
Adjust reflection for the possibility of discriminants larger than int.

Not only can discriminants be smaller than int now, but they can be
larger than int on 32-bit targets.  This has obvious implications for the
reflection interface.  Without this change, things fail with LLVM
assertions when we try to "extend" i64 to i32.
C-like enums are not always immediate
Add tests for enum discriminant sizing.
Work around const_eval issues by changing signed integer `min_value`s.

Otherwise, run-pass/deriving-primitive.rs breaks on 32-bit platforms,
because `int::min_value` is `0xffffffff7fffffff` when evaluated for the
discriminant declaration.
Add another discriminant-size-related test, this time with fields.
Fix type_of for enums to not lose data in some cases when immediate.

The previous implementation, when combined with small discriminants and
immediate types, caused problems for types like `Either<u8, i16>` which
are now small enough to be immediate and can have fields intersecting
the highest-alignment variant's alignment padding (which LLVM doesn't
preserve).  So let's not do that.
Prevent unoptimized rustpkg tests from running out of stack.

The actual fix would be to make rustpkg use `rustc::monitor` so it picks
up anything special that rustc needs, but for now let's keep the tests
from breaking.
rt: Remove rust_thread::detach
rt: Remove array_list.h
changed all the impl<T> to impl<T: Send> in rt::comm.rs and libstd::comm.rs #8180
auto merge of #10163 : brson/rust/rtcxx, r=alexcrichton