mk: Get "make check" passing with --disable-rpath

This involves passing through LD_LIBRARY_PATH through more places, specifically
in the compiletest, run-make, and doctest runners.
mk: restore check-notidy.

tidy has some limitations (e.g. the "checked in binaries" check doesn't
and can't actually check git), and so it's useful to run tests without
running tidy occasionally.
Fix emacs indentation of multi-line match patterns

Aligns to the same column if the previous line ends in a single '|' (but
not a '||').
Emacs: stay at the correct position when indenting

When indenting a non-blank line, stay at the same cursor position
relative to the content after indenting.
Emacs: indent relative to enclosing block

This changes the indent to calculate positions relative to the enclosing
block (or braced/parenthesized expression), rather than by an absolute
nesting level within the whole file.  This allows things like this to
work:

    let x =
        match expr {
            Pattern => ...
        }

With the old method, only one level of nesting would be added within the
match braces, so "Pattern" would have ended up aligned with the match.

The other change is that multiple parens/braces on the same line only
increase the indent once.  This is a very common case for passing
closures/procs.  The absolute nesting method would do this:

    spawn(proc() {
            // Indented out two indent levels...
    })

whereas the code in this commit does this:

    spawn(proc() {
        // Indented out only one level...
    })
Fix typo in emacs ERT test
green: remove ancient register-saving code.

@alexcrichton said he thought this was useless (and it's old logic: it's
been there since before the runtime was written into Rust).
flate: return CVec<u8> rather than copying into a new vector.

This trades an O(n) allocation + memcpy for a O(1) proc allocation (for
the destructor). Most users only need &[u8] anyway (all of the users in
the main repo), and so this offers large gains.
green,native,rustuv: Replace many pointer `transmute`'s with `as` or referencing.

These can all be written in a more controlled manner than with the
transmute hammer, leading to (hopefully) safer code.
native: be more const correct with the FFI calls.

These calls are mutating their argument and so it's bad behaviour to be
pretending that the values are immutable to rustc.
arena,std,serialize: remove some unnecessary transmutes.

`as`-able transmutes, duplication and manual slice decomposition are
silly.
Closes #12386. Removed 'pub mod' doc-comments in std::io's mod.rs file. Added summary doc-comments to test.rs, util.rs and stdio.rs.
Remove all ToStr impls, add Show impls

This commit changes the ToStr trait to:

    impl<T: fmt::Show> ToStr for T {
        fn to_str(&self) -> ~str { format!("{}", *self) }
    }

The ToStr trait has been on the chopping block for quite awhile now, and this is
the final nail in its coffin. The trait and the corresponding method are not
being removed as part of this commit, but rather any implementations of the
`ToStr` trait are being forbidden because of the generic impl. The new way to
get the `to_str()` method to work is to implement `fmt::Show`.

Formatting into a `&mut Writer` (as `format!` does) is much more efficient than
`ToStr` when building up large strings. The `ToStr` trait forces many
intermediate allocations to be made while the `fmt::Show` trait allows
incremental buildup in the same heap allocated buffer. Additionally, the
`fmt::Show` trait is much more extensible in terms of interoperation with other
`Writer` instances and in more situations. By design the `ToStr` trait requires
at least one allocation whereas the `fmt::Show` trait does not require any
allocations.

Closes #8242
Closes #9806
Remove deriving(ToStr)

This has been superseded by deriving(Show).

cc #9806
auto merge of #12412 : alexcrichton/rust/deriving-show, r=huonw

This commit removes deriving(ToStr) in favor of deriving(Show), migrating all impls of ToStr to fmt::Show.

Most of the details can be found in the first commit message.

Closes #12477
Move extra::json to libserialize

This also inverts the dependency between libserialize and libcollections.

cc #8784
Correctly ignore some tests on windows

These two tests are notoriously flaky on the windows bots right now, so I'm
ignoring them until I can investigate them some more. The truncate_works test
has been flaky for quite some time, but it has gotten much worse recently. The
test_exists test has been flaky since the recent std::run rewrite landed.
Finally, the "unix pipe" test failure is a recent discovery on the try bots. I
haven't seen this failing much, but better safe than sorry!

cc #12516
windows: Fix the test_exists unit test

Turns out the `timeout` command was exiting immediately because it didn't like
its output piped. Instead use `ping` repeatedly to get a process that will sleep
for awhile.

cc #12516
auto merge of #12523 : alexcrichton/rust/ignore-some-windows-tests, r=pnkfelix

These two tests are notoriously flaky on the windows bots right now, so I'm
ignoring them until I can investigate them some more. The truncate_works test
has been flaky for quite some time, but it has gotten much worse recently. The
test_exists test has been flaky since the recent std::run rewrite landed.
Finally, the "unix pipe" test failure is a recent discovery on the try bots. I
haven't seen this failing much, but better safe than sorry!

cc #12516
Gate default type parameter overrides.
Fixes #12423.