Ruby.java: make callEventHooks() thread-safe

It seems that concurrent calls to this method causes
Exception in thread "RubyThread-3: .." java.util.ConcurrentModificationException.