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
adapt to snapshot
desnapshot
new borrow checker (mass squash)
dataflow: fix flow of information through pattern variants
correct used_mut annotations for args, inherited case
rustc: remove modes
rustc: work around issue with default-method-simple, fix some rebase
errors
allover: numerous unused muts etc
borrowck: fix critical bug prevent us from ever using write guards :)
remove some unused mut decls
correct incorrect handling of overloaded operators, exposing various other bits of rot
keep old sort for stage0
rustc: print out filename/line-number when a borrow fails
add an option to debug borrows (RUST_DEBUG_BORROW) so you can
find out where the offending borrow occurred. This ... still needs
some work.
avoid broken += operator, bogus use of const
wip---work on making rooting work properly
rustc: adjust total number of lang items
rustc: fix the fact that trans_lvalue rooted twice