Add more JRuby deadlock fixes for the tests