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.
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.
Move extra::json to libserialize

This also inverts the dependency between libserialize and libcollections.

cc #8784
Gate default type parameter overrides.
Fixes #12423.
auto merge of #12445 : huonw/rust/less-unsafe, r=alexcrichton

Commits for details. Highlights:

- `flate` returns `CVec<u8>` to save reallocating a whole new `&[u8]`
- a lot of `transmute`s removed outright or replaced with `as` (etc.)
auto merge of #12453 : alexcrichton/rust/move-json, r=brson

This also inverts the dependency between libserialize and libcollections.

cc #8784
auto merge of #12465 : huonw/rust/notidy, r=brson

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.
Exclude build metadata from equality checking.

Build metadata is already excluded from precedence checking in line with
the spec. For consistency and providing strict total ordering for
Version, build metadata should also be ignored in Eq impl.

Closes #12438

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
std: minor whitespace cleanup
replace manual Hash impls with `#[deriving(Hash)]`
test: Use `#[deriving(Hash)]` in a couple tests
rustc: rename `hash` to the proper name `state`
auto merge of #12454 : omasanori/rust/semver-eq, r=alexcrichton

Closes #12438
rustc: Don't error on the rlib symlinks

This commit implements a layman's version of realpath() for metadata::loader to
use in order to not error on symlinks pointing to the same file.

Closes #12459
Use lines_any() when parsing output form "ar"

On windows lines are delimited with \r\n while on unix they're delimited with
\n.

cc #12471