More consistent Event behavior on JRuby.
Improved exception class detection when rescuing Agent and Promise.