std::rt::io::file: Enable I/O tests on Win32

Enable blocked tests which are now fixed by #9165.

Closes #8810.
std::rt::io::support: Fix ignored test on Win32

Assumes drive C: exists.

Closes #8812.
std::os: Use unicode for last_os_error() on Win32

FormatMessageA may return non-ascii message,
which is encoded as system code page, not utf8.
This may cause `assert!(is_utf8(v))` failure on
some non-English machines.
This patch replaces it with FormatMessageW,
which returns utf-16 message.

Fixes `make check-stage2-std` failure on my machine. :)
std::rt::uv::uvll: Fix uv_req_type on Win32

Also enables request_sanity_check() test.

Closes #8817
std::rt::io::net::tcp: Fix one tcp test on Win32

Fixes `connect_error` part of #8811.
std::rt::uv::uvio: Enable tests on Win32

Closes #8816.
extra::fileinput: Enable tests on Win32

They were blocked by #8810, but it works now.
std::rt::uv::file: Enable tests on Win32

Closes #8814.
c_str: Add new method .as_str() -> Option<&str>

Also rustify .as_bytes(), so it no longer calls libc::strlen() and is
inlineable.
Have workcache::test put `foo.c` in the same directory it runs in.

This prevents a stray `foo.c` from being left lying around after tests
run, and it's more consistent with the rest of the code.
Remove references to std::pipes from task tutorial

This module was removed a while ago, but the tasks tutorial wasn't
updated, and the old docs page for pipes was never deleted so the link
confusingly still worked!
std::num: Add uint::next_power_of_two_opt

Like next_power_of_two, but returns None on overflow.
auto merge of #9220 : kballard/rust/c_str-as_str, r=thestinger

Also rustify .as_bytes(), so it no longer calls libc::strlen() and is
inlineable.
Pass OS to gyp_uv
Ignore failing tests on Android
Resume inlining globals across crates

In #8185 cross-crate condition handlers were fixed by ensuring that globals
didn't start appearing in different crates with different addressed. An
unfortunate side effect of that pull request is that constants weren't inlined
across crates (uint::bits is unknown to everything but libstd).

This commit fixes this inlining by using the `available_eternally` linkage
provided by LLVM. It partially reverts #8185, and then adds support for this
linkage type. The main caveat is that not all statics could be inlined into
other crates. Before this patch, all statics were considered "inlineable items",
but an unfortunate side effect of how we deal with `&static` and `&[static]`
means that these two cases cannot be inlined across crates. The translation of
constants was modified to propogate this condition of whether a constant
should be considered inlineable into other crates.

Closes #9036
auto merge of #9121 : sanxiyn/rust/arm, r=alexcrichton

Ignore failing tests on Android to prepare for #9120.
gitattributes: force LF line endings for all files

This avoids default CRLF on msysgit for Windows which can cause trouble.
Cf. https://help.github.com/articles/dealing-with-line-endings#text-eollf

Commit dad2ccc9b3b27d3f438eeea53b771cc85f6dfa32 followup.
Closes #7723.
auto merge of #9192 : Kimundi/rust/master, r=huonw

A SendStr is a string that can hold either a ~str or a &'static str.
This can be useful as an optimization when an allocation is sometimes needed but the common case is statically known.

Possible use cases include Maps with both static and owned keys, or propagating error messages across task boundaries.

SendStr implements most basic traits in a way that hides the fact that it is an enum; in particular things like order and equality are only determined by the content of the wrapped strings.

This basically reimplements #7599 and has a use case for replacing an similar type in `std::rt::logging` ( Added in #9180).
extra::json: use a different encoding for enums.

It now uses `{"type": VariantName, "fields": [...]}`, which, according to
@Seldaek, since all enums will have the same "shape" rather than being a weird
ad-hoc array, will optimize better in javascript JITs. It also looks prettier,
and makes more sense.