rustc: Move code for discovering the crate entry point into its own pass

It doesn't have anything to do with resolve and the logic will likely get
more involved in the future, after #4433
rustc: Only accept main functions at the crate level. #4433
Port IRBuilder::CreateVectorSplat
Check SIMD vector types
Add core::simd and define SIMD vector types
Add SIMD vector type tests
Remove trailing whitespace
Generate LLVM SIMD vector types
Move core::simd to core::unstable::simd
Show lint names
Remove #[cfg(notest)] and use #[cfg(not(test))] to cooincide with #[cfg(debug)]
libstd: convert chained ifs to a match in base64.
Fix typos
rustc: Fix the logic for finding the Android main function

I don't understand what this logic is doing
auto merge of #6119 : brson/rust/main, r=brson

r? @ILyoan

This pulls all the logic for discovering the crate entry point into a new pass (out of resolve and typeck), then changes it so that main is only looked for at the crate level (`#[main]` can still be used anywhere).

I don't understand the special android logic here and worry that I may have broken it.
fix incorrect region code based on the old 'self

also removes unnecessary casts from the RcMut implementation
auto merge of #6214 : sanxiyn/rust/simd-2, r=graydon

At the moment this only includes type checking and there is no code generation support yet. I wanted to get the design reviewed first.

From discussion with @graydon at #5841, re-implemented as `#[simd]` attribute on structs.

Progressing towards #3499.
rename iter::iter_to_vec to iter::to_vec

it's silly to duplicate the namespace in the fn name
libstd: Remove mutable fields from fileinput and net_tcp
libstd: Remove mutable fields from flatpipes and io_util