add Thread.handle_interrupt, .pending_interrupt? and #pending_interrupt?