Remove the unused obsolete enum_discrim type.
Add SmallVector to libsyntax
Support multiple item macros

Closes #4375
Clean up SmallVector use a bit
auto merge of #10649 : sfackler/rust/multi-macro, r=alexcrichton

The majority of this change is modifying some of the `ast_visit` methods to return multiple values.

It's prohibitively expensive to allocate a `~[Foo]` every time a statement, declaration, item, etc is visited, especially since the vast majority will have 0 or 1 elements. I've added a `SmallVector` class that avoids allocation in the 0 and 1 element cases to take care of that.
auto merge of #10677 : jld/rust/type-enum-discrim-rm, r=alexcrichton
auto merge of #10679 : alexcrichton/rust/no-routine, r=pcwalton
Clean up statically initialized data on shutdown

Whenever the runtime is shut down, add a few hooks to clean up some of the
statically initialized data of the runtime. Note that this is an unsafe
operation because there's no guarantee on behalf of the runtime that there's no
other code running which is using the runtime.

This helps turn down the noise a bit in the valgrind output related to
statically initialized mutexes. It doesn't turn the noise down to 0 because
there are still statically initialized mutexes in dynamic_lib and
os::with_env_lock, but I believe that it would be easy enough to add exceptions
for those cases and I don't think that it's the runtime's job to go and clean up
that data.
Improve the rt::thread module

* Added doc comments explaining what all public functionality does.
* Added the ability to spawn a detached thread
* Added the ability for the procs to return a value in 'join'