auto merge of #13932 : MrAlert/rust/win-compat, r=brson

This addresses #12842 by offering fallback implementations for functions that aren't available.

In this case, as Windows XP simply doesn't support symbolic links at all, the fallbacks simply return an error code indicating that the function hasn't been implemented. This should allow programs written in Rust to run under XP while still offering full support for symbolic links under newer versions of Windows with the same binary, but due to LLVM using stderror_s(), which isn't available in msvcrt.dll in XP, rustc itself will not.

The fallback implementation is as follows:

Calling the function instead calls to a mutable function pointer. This in and of itself would not constitute a performance hit because DLL calls are implemented in a similar manner (see Import Address Table). The function pointer initially points to a thunk which tries to get the address of the associated function and write it back to the function pointer. If it fails to find the function, it instead writes the address to a fallback. As this operation is idempotent, reading and writing the pointer simply needs to be atomic. Subsequent calls to the function should be as fast as any other DLL call, as the pointer will then point directly to either the correct function or a fallback.
librustc: Remove all uses of `~str` from librustc.
Factor out foldable better to reduce code duplication.  There is now a "double
dispatch" pattern that lets you easily write new folders and then apply them to
various structures, reusing the "folding" effort.
librustdoc: Remove all `~str` usage from librustdoc.
auto merge of #14157 : pcwalton/rust/detildestr-rustdoc, r=pcwalton

r? @brson
Fix typos in rustc manpage
Add the patch number to version strings. Closes #13289
rustdoc: Fix hiding implementations of traits

This bug was introduced when rustdoc gained the ability to hyperlink across
crates in pub use statements.

Closes #14125
add shebang to scripts that have execute bit set
libcore: remove fails from slice.rs and remove duplicated length checking

core::slice::raw::{shift_ptr,pop_ptr} now returns Option<*T> rather than
*T. They no longer fail on empty slices.

[breaking-change]
Make ProcessOutput Eq, TotalEq, Clone
doc: updates rust manual (loop to continue)

Keyword for continue expressions was changed from loop to continue, but the
manual was not updated.
doc: Update the linkage documentation

After allowing mixing rlibs and dylibs in #13892, the documentation was not
updated accordingly to reflect this new capability.
Remove an unnecessary .move_iter().collect()
Add some long-overdue documentation on the INTERPOLATED helper macros.
Cleanup some ugly variable names, now that we have `let`-hygiene.
Fixed typo in comments of driver.rs
Add `stat` method to `std::io::fs::File` to stat without a Path.

The `FileStat` struct contained a `path` field, which was filled by the
`stat` and `lstat` function. Since this field isn't in fact returned by
the operating system (it was copied from the paths passed to the
functions) it was removed, as in the `fstat` case we aren't working with
a `Path`, but directly with a fd.

If your code used the `path` field of `FileStat` you will now have to
manually store the path passed to `stat` along with the returned struct.

[breaking-change]
rustdoc: List macros in the sidebar
shootout-nbody improvement

- factorize operation
- factorize loop (and gain a level of indentation)
- ~5% faster

Thanks to @Ryman for the propositions :)