Merge eight compiler improvements

This is a rollup merge combining eight separate improvements to Rust's compiler and build system, including better error messages for ambiguous type inference, new comparison functions in the standard library (`smallest` and `largest`), improvements to the bootstrap build system's command-line parsing, and various internal refactorings.