rt: don't save and restore xmm/regs in __morestack.
core::rt: Restructure task_from_last_cleanup_job to borrow correctly

We need a number of mutable references to contexts so name it
`get_contexts` and return a tuple of all of them.
core::rt: Rename block_running_task_and_then to deschedul_...
core::rt: Insert calls to run_cleanup_tasks after all context switches
core::rt: Schedulers only need a single cleanup_job at a time

Each context switch has up to one cleanup job and it is always
executed immediately after the context switch.
core::rt: All context switches are followed by a cleanup action
core::rt: Clean up the thread-local scheduler code

Remove the ThreadLocalScheduler type in favor of functions.
Move everything into the sched::local module.
Prevent eval_const_expr_partial hides prior error in expr_cast arm.

This will help not to meet confusing errors.
In issue #5873, the error was "expected constant expr for vector length: Can't cast str to int".
It was originally "expected constant expr for vector length: Non-constant path in constant expr"
This patch make the original error to be printed.
rt: Move test functions to rust_test_helpers.cpp
core::rt: Fix two incorrect uses of the thread-local scheduler

These would not be threadsafe
core::rt: Move thread-local scheduler to its own module
core::rt: A little bit of cleanup to thread-local scheduler
core::rt: Rename Scheduler::local to Scheduler::unsafe_local
core::rt: Make Scheduler::unsafe_local return a fabricated region pointer

Instead of taking a closure. It's unsafe either way. Rename it to unsafe_local_borrow.
core::rt: Restructure context switches to take ownership of the Scheduler

In order to do a context switch you have to give up ownership of the scheduler,
effectively passing it to the next execution context. This could help avoid
some situations here tasks retain unsafe pointers to schedulers between context
switches, across which they may have changed threads.

There are still a number of uses of unsafe scheduler pointers.
core::rt: Narrow down the unsafety of the thread-local scheduler

Only when borrowing the I/O implementation do we need unsafety
core::rt: Clean up some more hacks
Merge remote-tracking branch 'brson/sched-cleanup'

Conflicts:
	src/libcore/rt/sched/mod.rs
auto merge of #5890 : youknowone/rust/const-eval, r=catamorphism

This will help not to meet confusing errors.
In issue #5873, the error was "expected constant expr for vector length: Can't cast str to int".
It was originally "expected constant expr for vector length: Non-constant path in constant expr" (though still invalid error).
This patch make the original error to be printed.
Fix issue 2626 by un-ignoring the mysterious test_leaks, 
which does currently seem to work on win32 (and linux).