Fixing Iota to be completely thread safe.

Part two of the rustbox - iota changes to make RustBox thread safe.  This requires the rustbox changes to be included first.

This resolves double-free assertions that were happening consistently for
me in RustBox when I exited.  It also preserves stacktraces properly
without terminating RustBox early.

This is motivated by changes in RustBox (to replace the old unsafe API
with a safe Rust one).  Note that in theory, we should be able to split
RustBox out into two components, an input component and an output
component, but to do that properly and keep it threadsafe requires &mut
references to be sent across thread boundaries.  Currently that would
require unsafe code, so for the moment we revert to a single-threaded
solution.
I actually think we want to recalculate this on the fly in the long run.  There are SIGWINCH events (which we're not currently handling) that will inform us of changing window sizes.