Refactor `Vec::map_in_place` to move code out of `PartialVec`

Additionally, support zero-sized types.
Removed some unnecessary RefCells from resolve
Fixes ICE when using reexported unit-like structs

Fixes that unit-like structs cannot be used if they are reexported and
used in another crate. The compiler fails with an ICE, because unit-like
structs are exported as DefFn and the expression `UnitStruct` is
interpreted as function pointer instead of a call to the constructor.

To resolve this ambiguity tuple-like struct constructors are now exported
as CtorFn. When `rustc::metadata::decoder` finds a CtorFn it sets a new
flag `is_ctor` in DefFn to true.

Relevant changes are in `rustc::metadata::{encoder, decoder}` and in
`rustc::middle::ty`.

Closes #12660 and #16973.
Turn on cfg format warnings
Fix cfg warnings for liblibc
Fix liballoc
Fix libstd
Fix librustrt
Fix libtime
Fix librustc_back
Fix librustc
Fix librustc_llvm
Fix libgreen
Fix libnative
Fix librustuv
Fix rustdoc
Fold `MethodOrigin`s to resolve inference variables they may contain.
Fixes #17662.
Remove unnecessary allocation, update API name for starting the rustc driver.
libstd: Pass-through PATH in test_override_env

In some build environments (such as chrooted Nix builds), `env` can only
be found in the explicitly-provided PATH, not in default places such as
/bin or /usr/bin. So we need to pass-through PATH when spawning the
`env` sub-process.

Fixes #17617
auto merge of #17630 : sfackler/rust/cfg-warnings, r=brson

Closes #17490