std: remove some test warnings
std: result::collect to take an iterator, add option::collect
auto merge of #11098 : erickt/rust/collect, r=alexcrichton

This patch changes `result::collect` (and adds a new `option::collect`) from creating a `~[T]` to take an `Iterator`. This makes the function much more flexible, and may replace the need for #10989.

This patch is a little more complicated than it needs to be because of #11084. Once that is fixed we can replace the `CollectIterator` with a `Scan` iterator.

It also fixes a test warning.
Implement the #[boot] attribute

Before this patch there was no ability to link to both libnative and libgreen
and specify which should be used to boot the main function. This commit moves
this logic into a #[boot] attribute which can allow control over this. The
changes made are:

1. The lang_start function is moved back into libstd with the signature:
   fn(*u8, *u8, int, *u8) or (main, boot, argc, argv)
2. Functions can now be tagged with #[boot] to indicate that the function can be
   used to boot a rust crate. This boot function is serialized to metadata.
3. Imports of external modules can also be tagged with #[boot] to indicate that
   the crate's boot-function should be used to boot the runtime
4. Only one #[boot] function/crate is allowed in an executable, more than one is
   an error (along with zero as well).
5. The compiler will automatically inject '#[boot] extern mod green;' for now,
   this can be overrided with #[no_boot].

With this new attribute, control over how a crate boots can be fine-tuned per
executable and libraries can specify arbitrary boot functions. The boot function
is purely responsible for dictating what context the 'main' function is run in,
runtime initialization via rt::init is not the responsibility of the boot
function. Finally, the boot function is also responsible for blocking until all
rust tasks have exited.