compiletest: fix decision rule to run and cleanup
auto merge of #6046 : brson/rust/io, r=graydon

r? @pcwalton

Sorry this is so big, and sorry the first commit is just titled 'wip'.

Some interesting bits

* [LocalServices](https://github.com/brson/rust/commit/f9069baa70ea78117f2087fe6e359fb2ea0ae16a) - This is the set of runtime capabilities that *all* Rust code should expect access to, including the local heap, GC, logging, unwinding.
* [impl Reader, etc. for Option](https://github.com/brson/rust/commit/5fbb0949a53a6ac51c6d9b187ef4c464e52ae536) - Constructors like `File::open` return Option<FileStream>. This lets you write I/O code without ever unwrapping an option.

This series adds a lot of [documentation](https://github.com/brson/rust/blob/io/src/libcore/rt/io/mod.rs#L11) to `core::rt::io`.
Correct mismatch between the way that pattern ids and expression ids map to types (pattern ids map to the input type, expression ids map to the output type)
Make build products depend on their target directories.

This is an attempt to address Issue #3326 by adding [*order-only*][1]
prerequsites of each build product on the directory where it is to go.
It is important that the prerequisites be order-only, since the
timestamp on a parent directory is not relevant to whether a product
is out of date; the parent directory merely needs to exist.

(This use case of generating target directories was provided as an
[example][2] of how order-only prequisites are used.)

[1]: http://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html

[2]: http://www.kolpackov.net/pipermail/notes/2004-January/000001.html
auto merge of #6213 : kud1ing/rust/patch-1, r=graydon

...re/index.html
auto merge of #6216 : Sodel-the-Vociferous/rust/dralston-6146, r=graydon

cc #6146
lang: um, actually set locking bits! this code got lost.
librustc: Add argument to allow choosing "linker"
auto merge of #6217 : Sodel-the-Vociferous/rust/export-ToBytes, r=graydon
rustc: Handle struct patterns where the expected type is an enum

Previously, rustc would ICE if you matched on an enum-typed thing
with a structure pattern. Error out correctly.
tidy
Be more careful about the order in which we read the next field
during task annihilation, since it is easy to tread on freed memory.
rustc: add rooting, write-guards to slices etc
Remove pub from core::{unicode,cmath,stackwalk,rt}
auto merge of #6200 : catamorphism/rust/issue-5358, r=catamorphism

r? @nikomatsakis Previously, rustc would ICE if you matched on an enum-typed thing
with a structure pattern. Error out correctly. This will close #5358
rustpkg: Implement install command

    The install command should work now, though it only installs
    in-place (anything else has to wait until I implement RUST_PATH).

Also including:
    core: Add remove_directory_recursive, change copy_file

    Make copy_file preserve permissions, and add a remove_directory_recursive
    function.
tidy
rustpkg: Handle sysroot more correctly

In rustpkg, pass around sysroot; in rustpkg tests, set the sysroot
manually so that tests can find libcore and such.

With bonus metadata::filesearch refactoring to avoid copies.
core: Warning police
std: Warning police