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
compiletest: Run tests in their own thread to avoid blocking the scheduler

The calls to waitpid are interacting badly with the message passing that goes
on between schedulers and causing us to have very little parallelism in
the test suite. I don't fully understand the sequence of events that causes
the problem here but clearly blocking on waitpid is something that a
well-behaved task should not be doing.

Unfortunately this adds quite a bit of overhead to each test: one thread, two
tasks, three stacks, so there's a tradeoff. The time to execute run-pass on
my 4-core machine goes from ~750s to ~300s.
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".
Cleanup: remove useless parameter
Test for issue #6338.
Pointers to bound variables are stored after all patterns are matched.

Pointers to bound variables shouldn't be stored before checking pattern,
otherwise piped patterns can conflict with each other (issue #6338).

Closes #6338.
Fix error message when trait method ends with wrong token

When parsing a trait function, the function must end with either `;` or
`{` (signifying a default implementation). The error message incorrectly
stated that it must be `;` or `}`.

Fixes #6610.
testsuite: xfailed test cases
auto merge of #7917 : catamorphism/rust/resolve-and-testcases, r=catamorphism
Better error message for unknown start of token

The span was fixed at some point to point to the correct character, but
the error message is still bad. Update it to emit the actual character
in question (potentially escaped).

Fixes #3747.
syntax: add a local_data_key macro that creates a key for access to the TLS.

This allows the internal implementation details of the TLS keys to be
changed without requiring the update of all the users. (Or, applying
changes that have to be applied for the keys to work correctly, e.g.
forcing LLVM to not merge these constants.)