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
Improve lifetimes on foldl/foldr and lift the Copy requirement
libsyntax: extend generic deriving code to handle almost all possible traits.

This adds support for static methods, and arguments of most types, traits with
type parameters, methods with type parameters (and lifetimes for both), as well
as making the code more robust to support deriving on types with lifetimes (i.e.
'self).
libsyntax: convert #[deriving(IterBytes)] to generic deriving
libsyntax: add #[deriving(Rand, ToStr)].

The former fills each field of a struct or enum variant with a random
value (and picks a random enum variant). The latter makes the .to_str
method have the same output as fmt!("%?", ..).
testsuite: tests for deriving changes and additions
Add a test for issue 5517
Enable test for #3707
remove borrowck workarounds from the containers
minor automatic whitespace fixes
renamed tests
mk: rt.mk regression patch for mingw32 after #6176
mk: target.mk host.mk fix for duplicated rules of mingw32 after #6235
Make lint_table static
Switch to using 'ln' for the natural logarithm and 'log' for arbitrary base logarithms
Implement exp_m1 and ln_1p as methods for Float

Both expm1 and ln1p have been renamed to exp_m1 and ln_1p in order to be consistent with the underscore usage elsewhere.

The exp_m1 method is used for increased accuracy when doing floating point calculations, so this has been moved from the more general 'Exponential' trait into 'Float'.
Fix order of methods
Add abs_sub method to Signed trait
Lift restriction on calling extern C functions, and propagate
the ABI as part of the type of an extern fn. cc #3678