auto merge of #11946 : alexcrichton/rust/no-io-error, r=brson

Turns out this was a little more far-reaching than I thought it was.

The first commit is the crux of this stack of commits. The `io::io_error` condition is completely removed and the `read` and `write` methods are altered to return `IoResult<T>`. This turned out to be an incredibly far-reaching change!

Overall, I'm very happy with how this turned out (in addition with the `unused_must_use` lint). I had to almost rewrite the pretty printer in `libsyntax` as well as the the formatting in `librustdoc` (as one would expect). These two modules do *tons* of I/O, and I believe that it's definitely improved.

This pull request also introduces the `if_ok!()` macro for returning-early from something that returns a result. I made quite liberal use of this in mostly the pretty printer and html renderer, and I found its usage generally quite pleasant and convenient to have. I didn't really feel like adding any other macro while I was using it, and I figured that pretty printing could be nicer, but it's nowhere near horrid today.

This may be a controversial issue closing, but I'm going to say it.

Closes #6163
Add an AtomicU64 type to std::sync::atomics

This also generalizes all atomic intrinsics over T so we'll be able to add u8
atomics if we really feel the need to (do we really want to?)
Enable the +v7 feature on Android by default

With the recently added double word CAS functionality on 32-bit ARM (enabled via
a 64-bit atomic instruction in LLVM IR), without some extra features enabled
LLVM lowers code to function calls which emulate atomic instructions. With the
v7 feature enabled, proper 64-bit CAS instructions are used on 32-bit arm.

I've been told that v7 for arm is what we should have been doing anyway. This is
overridable by providing some other non-empty feature string.
extra: Make room for more sync primitives
extra: Add an intrusive MPSC to be used soon
std: Hardcode pthread constants and structures

This allows for easier static initialization of a pthread mutex, although the
windows mutexes still sadly suffer.

Note that this commit removes the clone() method from a mutex because it no
longer makes sense for pthreads mutexes. This also removes the Once type for
now, but it'll get added back shortly.
extra: Re-add the Once primitve to extra::sync

This originally lived in std::unstable::mutex, but now it has a new home (and a
more proper one).
std: Remove try_send_deferred plus all fallout

Now that extra::sync primitives are built on a proper mutex instead of a
pthreads one, there's no longer any use for this function.
extra: Introduce a mutex type for native/green threads
Various bug fixes and rebase conflicts