Inject std when --test. #1127, #3241

r? @pcwalton

This solves some long standing issues with `--test`, automatically linking to `std`. It may also help with the resolution changes you are working on.

When building a test runner it does something like this

```
mod __test {
    extern mod std(vers = "0.6");

    fn main() {
        ...
    }
}
```

Then, whenever it builds paths to `std` it uses `self::std::test` to reference the injected `std`. When building a test runner for `std` it instead uses paths like `::test`.

As a side-effect, core no longer needs to declare a magic `std` module.

This isn't fully tested yet because of some breakage with stdtest on incoming.