prevent busy loop in ruby 1.8.7 exception handling

EM.run_deferred_callbacks relies on checking the $! variable for an
exception. In ruby 1.8.7 there are cases where this value is copied
from a different thread and never cleared, resulting in a busy loop
that constantly reschedules an empty block. Use local exception
checking instead.