Use defvar for rust-top-item-beg-re instead

Since rust-top-item-beg-re hasn't been defined yet, using defvar instead of
setq is more appropriate here (and also silences compilation warnings).
Implement fallbacks for functions unavailable in older versions of Windows
Refactor writeback code. cc #5527
Remove error message that refactor suppresses
rustc: Fix enum variant privacy across crates

The code in resolve erroneously assumed that private enums weren't visited, so
the logic was adjusted to check to see if the enum definition itself was public.

Closes #11680
Add documentation for Windows compatibility layer and remove unneeded attributes
Add testcase for #11493
Move Windows compatibility layer to libnative
std: Remove bump_box_refcount. Deprecated and unused. Deprecused.
std: Doc typos
std: Reorder definitions in cast

Prioritize `transmute` and `forget`.
std: Change names of transmute's type parameters

from L, G to T, U. I don't know what L and G mean.
T, U easier to understand.
std: Small doc tweaks
Change the biguint documentation example to reflect deprecated owned vector
std: Mark timeout methods experimental

This was intended as part of the I/O timeouts commit, but it was mistakenly
forgotten. The type of the timeout argument is not guaranteed to remain constant
into the future.
libsyntax: Remove uses of `~str` from libsyntax, and fix fallout
auto merge of #14032 : pcwalton/rust/detildestr, r=alexcrichton

r? @brson
std: Extract format string parsing out of libstd

This code does not belong in libstd, and rather belongs in a dedicated crate. In
the future, the syntax::ext::format module should move to the fmt_macros crate
(hence the name of the crate), but for now the fmt_macros crate will only
contain the format string parser.

The entire fmt_macros crate is marked #[experimental] because it is not meant
for general consumption, only the format!() interface is officially supported,
not the internals.

This is a breaking change for anyone using the internals of std::fmt::parse.
Some of the flags have moved to std::fmt::rt, while the actual parsing support
has all moved to the fmt_macros library.

[breaking-change]
Correct attribute grammar in reference manual
std: Ignore a flaky test on freebsd

This test runs successfully manually, but the bots are having trouble getting
this test to pass. Ignore it on freebsd for now.