Add Imenu support for rust-mode.

+ Delete trailing whitespace.
librustc: Pass the correct type when adding cleanups.
Made Results API more composable
syntax::deriving: add the cx and span to the TraitDef to reduce duplication.
syntax: print expansion info from #[attribute] macros in the correct
format.

Previously, any attempt to use this information from inside something
like #[deriving(Foo)] would result in it printing like `deriving(Foo)!`.
syntax::deriving: indicate from which trait type errors (etc) arise
using the expansion info.

Previously something like

    struct NotEq;

    #[deriving(Eq)]
    struct Error {
        foo: NotEq
    }

would just point to the `foo` field, with no mention of the
`deriving(Eq)`. With this patch, the compiler creates a note saying "in
expansion of #[deriving(Eq)]" pointing to the Eq.
std::str: Add examples to the StrSlice trait.

Fixes #10819.
auto merge of #10809 : alexcrichton/rust/static-snapshot, r=alexcrichton

Now that we have the necessary logic in rustc for windows, this is possible to land.
auto merge of #10364 : Kimundi/rust/result_compose, r=alexcrichton

This implements parts of the changes to `Result` and `Option` I proposed and discussed in this thread: https://mail.mozilla.org/pipermail/rust-dev/2013-November/006254.html

This PR includes:
- Adding `ok()` and `err()` option adapters for both `Result` variants.
- Removing `get_ref`, `expect` and iterator constructors for `Result`, as they are reachable with the variant adapters.
- Removing `Result`s `ToStr` bound on the error type because of composability issues. (See https://mail.mozilla.org/pipermail/rust-dev/2013-November/006283.html)
- Some warning cleanups
auto merge of #10797 : pradeep90/rust/rust-mode-changes, r=brson

+ Delete trailing whitespace.
auto merge of #10824 : huonw/rust/str-doc, r=alexcrichton

Fixes #10819.
auto merge of #10831 : luqmana/rust/9382, r=nikomatsakis

Fixes #9382.

r? @nikomatsakis
auto merge of #10844 : huonw/rust/deriving-expn-info, r=alexcrichton

Previously something like

    struct NotEq;

    #[deriving(Eq)]
    struct Error {
        foo: NotEq
    }

would just point to the `foo` field, with no mention of the
`deriving(Eq)`. With this patch, the compiler creates a note saying "in
expansion of #[deriving(Eq)]" pointing to the Eq.

(includes some cleanup/preparation; the commit view might be nicer, to filter out the noise of the first one.)
Rewrite std::comm

* Streams are now ~3x faster than before (fewer allocations and more optimized)
    * Based on a single-producer single-consumer lock-free queue that doesn't
      always have to allocate on every send.
    * Blocking via mutexes/cond vars outside the runtime
* Streams work in/out of the runtime seamlessly
* Select now works in/out of the runtime seamlessly
* Streams will now fail!() on send() if the other end has hung up
    * try_send() will not fail
* PortOne/ChanOne removed
* SharedPort removed
* MegaPipe removed
* Generic select removed (only one kind of port now)
* API redesign
    * try_recv == never block
    * recv_opt == block, don't fail
    * iter() == Iterator<T> for Port<T>
    * removed peek
    * Type::new
* Removed rt::comm
Fallout of rewriting std::comm
Fixes from review I'll rebase later