Began implementing a proper shutdown sequence. It's incomplete.
Revert "Began implementing a proper shutdown sequence. It's incomplete."

This reverts commit 908395db6cbc627596dfce4fc07762bfe2780d21.
Proper shutdown handling for threaded coroutines.
Merge branch 'next' into daniel_2168
Removed an unnecessary header.
Add ifdefs to make this compile without THREADED_COROUTINES
Merge branch 'daniel_2168' into next
Merge branch 'next' of github.com:rethinkdb/rethinkdb into next