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.
Updated documentation to refer to extra module

The documentation was still refering to getopts as though it was in the
std module - I've changed this to refer to extra instead.
Fix all issues with sample code

The getopts sample program now compiles and runs. Additionally I made
all of the indentation uniformly four spaces.
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
librustc: Don't allow newtype or unit-like structs to shadow other names in the value namespace.
Replace str::raw::buf_as_slice with c_str_to_static_slice. Close #3843.
Remove 'this could be clearer' FIXME. Looks fine. Close #2618.
librustc: Better errors for duplicate definitions.
Add test for #7044.
Tag a bunch of destructors that need mutable self with FIXME for #4330. Close #4943.
terminfo: Support more terminfo directory structures

OS X's terminfo uses the hex representation of the first character of
the terminal name as the directory name.

Ubuntu seems to use /lib/terminfo instead of /usr/share/terminfo, at
least on the one machine I have access to.
auto merge of #7042 : kballard/rust/terminfo-searcher-paths, r=thestinger

r? @cmr
std: convert pow, hypot, atan2, log to take arguments by reference.
extra: implement .norm(), and Polar conversion functions for complex numbers.

Also, convert complex to use Clone, rather than Copy.

Fixes #5734 and #5735.
auto merge of #7046 : luqmana/rust/issue-7044, r=sanxiyn

Fixes #7044.
rt: dummy function pthread_atfork for android
auto merge of #7054 : yichoi/rust/after_jemalloc, r=brson

jemalloc searches pthread_atfork
auto merge of #7050 : huonw/rust/extra-complex-work, r=Aatch
lexer: show correct span on unrecognized token start

Fixes part of #7048.