Check stk before dereferencing

This commit fixes #7022 - I've added an additional check to ensure that
stk is not null before dereferencing it to get it's next element,
assigning NULL if it is itself NULL.
Remove all usage of the global LLVMContextRef

This allows parallel usage of the rustc library
Have JIT execution take ownership of the LLVMContextRef

Also stop leaking the ExecutionEngine created for jit code by forcibly disposing
of it after the JIT code has finished executing
Assert stk rather than checking null

Given that a big stack is never requested before allocating an initial
stack segment, having a non-null stk member here is an invariant.
add Iterator implementations for Option
option: remove redundant old_iter impls
fix windows build
rustc: Remove task type defs from trans
Add a finally impl for `extern "Rust" fn()`
Ignore the test_package_request_version test for now
Replace tabs with spaces
Codegen: Combine two PointerCasts into one

Shaves off a percent or so from the LLVM passes for librustc.
auto merge of #7040 : alexcrichton/rust/issue-6511-threadsafe-llvm, r=graydon

This is a reopening of #6570, and almost fixes #6511.

Note that this doesn't actually enable building a threadsafe LLVM, because that will require an LLVM rebuild which will be bundled with the upgrades in #6713.

What this does do, however, is removes all thread-unsafe usage of LLVM from the compiler.
auto merge of #7033 : influenza/rust/rust-7022, r=graydon

This commit fixes #7022 - I've added an additional check to ensure that
stk is not null before dereferencing it to get it's next element,
assigning NULL if it is itself NULL.
fix the ptr::set_memory docstring
fix the docstring for copy_nonoverlapping_memory
auto merge of #7055 : thestinger/rust/iterator, r=catamorphism

This was a lot more painful than just changing `x.each` to `x.iter().advance` . I ran into my old friend #5898 and had to add underscores to some method names as a temporary workaround.

The borrow checker also had other ideas because rvalues aren't handled very well yet so temporary variables had to be added. However, storing the temporary in a variable led to dynamic `@mut` failures, so those had to be wrapped in blocks except where the scope ends immediately.

Anyway, the ugliness will be fixed as the compiler issues are fixed and this change will amount to `for x.each |x|` becoming `for x.iter |x|` and making all the iterator adaptors available.

I dropped the run-pass tests for `old_iter` because there's not much point in fixing a module that's on the way out in the next week or so.
auto merge of #7056 : alexcrichton/rust/issue-4727, r=catamorphism

Closes #4727
std: convert {vec,str}::to_owned to methods.
std: replace str::append with a method