std: Add experimental networking methods

The underlying I/O objects implement a good deal of various options here and
there for tuning network sockets and how they perform. Most of this is a relic
of "whatever libuv provides", but these options are genuinely useful.

It is unclear at this time whether these options should be well supported or
not, or whether they have correct names or not. For now, I believe it's better
to expose the functionality than to not, but all new methods are added with
an #[experimental] annotation.
test: Add a compile-fail-fulldeps test suite

Compile-fail tests for syntax extensions belong in this suite which has correct
dependencies on all artifacts rather than just the target artifacts.

Closes #13818
rustc: Add some suppot for mixing rlibs and dylibs

Currently, rustc requires that a linkage be a product of 100% rlibs or 100%
dylibs. This is to satisfy the requirement that each object appear at most once
in the final output products. This is a bit limiting, and the upcoming libcore
library cannot exist as a dylib, so these rules must change.

The goal of this commit is to enable *some* use cases for mixing rlibs and
dylibs, primarily libcore's use case. It is not targeted at allowing an
exhaustive number of linkage flavors.

There is a new dependency_format module in rustc which calculates what format
each upstream library should be linked as in each output type of the current
unit of compilation. The module itself contains many gory details about what's
going on here.

cc #10729
Generalize stats from f64 to the Float trait
Use is_zero
rustdoc: Fix inclusion of the new fonts

These fonts were moved into place by rust's makefiles, but rustdoc is widely
used outside of rustc itself. This moves the fonts into the rustdoc binary,
similarly to the other static assets, and writes them to the output location
whenever rustdoc generates documentation.

Closes #13593
Closes #13787
rustdoc: Don't have rustc emit warnings

They're much more useful when building code, much less so when building
documentation.

Closes #13894
rustdoc: Stop requiring a crate ID attribute

This is mostly just an artificial requirement as it can use similar logic to the
compiler to infer the crate id.
rustdoc: Put bangs on the names of macros

This makes them a little easier to search for and makes it clearer that they're
a macro and not an item to import.

Closes #13852
syntax: Fix duplicate attributes on module files

The outer attributes were manually appended when a module file was parsed, but
the attributes were also added higher up the stack of parsing (when the module
finished parsing). This removes the append in parsing the module file.

Closes #13826
rustdoc: Make static initalizers prettier

Previously, if an initializer took multiple lines or was just large in general,
it was pretty poorly rendered [1] [2]. This alters the logic to just link back
to the source for any multi-line static, with a placeholder of "[definition]".
This should make reading statics a little easier on the eyes. All single-line
statics are still inlined in the documentation.

Closes #13198

[1] - http://static.rust-lang.org/doc/master/sync/mutex/index.html#statics
[2] - http://static.rust-lang.org/doc/master/std/sync/atomics/index.html#statics
rustdoc: Allow forcing inlining of `pub use`

Rustdoc currently doesn't inline documentation of a `pub use` if the target is
publicly reachable. This changes rustdoc to allow a #[doc(inline)] attribute to
force inlining the documentation, regardless of whether the targe is public or
not.

Closes #13045
rustdoc: Have no_run imply no_trans

This allows writing code examples which pass all analysis of the compiler, but
don't actually link. A good example is examples that use extern {} blocks.

Closes #12903
rustdoc: Migrate from sundown to hoedown

This primary fix brought on by this upgrade is the proper matching of the ```
and ~~~ doc blocks. This also moves hoedown to a git submodule rather than a
bundled repository.

Additionally, hoedown is stricter about code blocks, so this ended up fixing a
lot of invalid code blocks (ending with " ```" instead of "```", or ending with
"~~~~" instead of "~~~").

Closes #12776
rustdoc: Enable the footnote markdown extension

This enables hoedown's footnote extension, and fixes all footnotes in the
reference manual to use the new syntax.
doc: Remove latex math documentation

This hasn't worked since pandoc stopped being used. We can get by well enough
with the superscript extension for these equations.

Closes #12989
rustdoc: Turn the noise down on implemented traits

This commit removes the inherited documentation from type pages. This generally
just clutters up the page when you can click through to the trait itself to get
all the meaty documentation.

Closes #11991
docs: change compositionality to composability
vim: Fix indentation at global scope after non-semantic ([{/)]}

If an unbalanced [ exists in a string or comment, this should not be
considered when calculating the indent at the top level.

Similarly, when testing for ({/}) to see if we're at the top level to
begin with, strings and comments should be skipped.
std: deprecate cast::transmute_mut.

Turning a `&T` into an `&mut T` carries a large risk of undefined
behaviour, and needs to be done very very carefully. Providing a
convenience function for exactly this task is a bad idea, just tempting
people into doing the wrong thing.

The right thing is to use types like `Cell`, `RefCell` or `Unsafe`.

For memory safety, Rust has that guarantee that `&mut` pointers do not
alias with any other pointer, that is, if you have a `&mut T` then that
is the only usable pointer to that `T`. This allows Rust to assume that
writes through a `&mut T` do not affect the values of any other `&` or
`&mut` references. `&` pointers have no guarantees about aliasing or
not, so it's entirely possible for the same pointer to be passed into
both arguments of a function like

    fn foo(x: &int, y: &int) { ... }

Converting either of `x` or `y` to a `&mut` pointer and modifying it
would affect the other value: invalid behaviour.

(Similarly, it's undefined behaviour to modify the value of an immutable
local, like `let x = 1;`.)

At a low-level, the *only* safe way to obtain an `&mut` out of a `&` is
using the `Unsafe` type (there are higher level wrappers around it, like
`Cell`, `RefCell`, `Mutex` etc.). The `Unsafe` type is registered with
the compiler so that it can reason a little about these `&` to `&mut`
casts, but it is still up to the user to ensure that the `&mut`s
obtained out of an `Unsafe` never alias.

(Note that *any* conversion from `&` to `&mut` can be invalid, including
a plain `transmute`, or casting `&T` -> `*T` -> `*mut T` -> `&mut T`.)

[breaking-change]