std: Change ProcessOptions struct to have an option of a ~ vector

This is a workaround for #8498
testsuite: Add xfailed test for #8498
std: Change either::{lefts, rights} to return an iterator
Update either::partition

Remove the only use of either::partition since it was better
accomplished with vector methods.

Update either::partition so that it sizes the vectors correctly before
it starts.
std: Replace map_vec, map_vec2, iter_vec2 in std::result

Replace these with three functions based on iterators: collect, fold,
and fold_. The mapping part is replaced by iterator .map(), so the part
that these functions do is to accumulate the final Result<,> value.

* `result::collect` gathers `Iterator<Result<V, U>>` to `Result<~[V], U>`
* `result::fold` folds `Iterator<Result<T, E>>` to `Result<V, E>`
* `result::fold_` folds `Iterator<Result<T, E>>` to `Result<(), E>`
Clarify docs on CString.unwrap()

CString.unwrap() drops ownership of the buffer on the floor. Put this in
the docs.
rustc: Change ICE message to reflect that ::rt::backtrace doesn't exist
Check for interior nulls in .to_c_str()

Previous dicussions about CString suggested that interior nulls should
throw an error. This was never implemented. Add this now, using a
condition (named null_byte) to allow for recovery.

Add method .to_c_str_unchecked() that skips this check.
Add ToCStr method .with_c_str()

.with_c_str() is a replacement for the old .as_c_str(), to avoid
unnecessary boilerplate.

Replace all usages of .to_c_str().with_ref() with .with_c_str().
Make CString.iter() public
Remove inappropriate .to_c_str() in C_cstr()

LLVMConstStringInContext() doesn't need a null-terminated string. It
takes a length instead. Using .to_c_str() here triggers an ICE whenever
the string literal embeds a null, as in "\x00".
auto merge of #8518 : catamorphism/rust/issue-8498-workaround, r=brson

r? @brson
auto merge of #8526 : blake2-ppc/rust/either-result, r=catamorphism

Retry of PR #8471

Replace the remaining functions marked for issue #8228 with similar functions that are iterator-based.

Change `either::{lefts, rights}` to be iterator-filtering instead of returning a vector.

Replace `map_vec`, `map_vec2`, `iter_vec2` in std::result with three functions:

* `result::collect` gathers `Iterator<Result<V, U>>` to `Result<~[V], U>`
* `result::fold` folds `Iterator<Result<T, E>>` to `Result<V, E>`
* `result::fold_` folds `Iterator<Result<T, E>>` to `Result<(), E>`
auto merge of #8530 : brson/rust/rt-backtrace, r=alexcrichton

The new scheduler didn't preserve this behavior.
auto merge of #8532 : kballard/rust/cstr-cleanup, r=erickt

Implement interior null checking in `.to_c_str()`, among other changes.
debuginfo: Fixed option-like-enum test case so it does not rely on undefined behavior.
debuginfo: Generate template type parameters for generic functions.

Conflicts:
	src/librustc/lib/llvm.rs
	src/librustc/middle/trans/debuginfo.rs
	src/rustllvm/RustWrapper.cpp
	src/rustllvm/rustllvm.def.in
debuginfo: Properly handle monomorphization of generic functions.
debuginfo: Added test cases for generic structs and enums.

Also, always set no_monomorphic_collapse flags if debuginfo is generated.
debuginfo: Fixed crash occuring for parameterless closures.