Some sanity for `utils::chained`; some sanity for detecting context switches.

I hope I didn't break something. This `thread1->save(); thread2->load()`
will need some wrapper that will also check address spaces, extended
contexts and such.
`hash_map`