JRubyTest: fix JRuby unit tests

They need to use global variables (prepended with $) where appropriate.

Clearing the bindings is also very tricky with the JRuby script engine,
so let's remove that test for the time being. (I explored setting the
"org.jruby.embed.clear.variables" attribute to true and/or
"org.jruby.embed.localvariable.behavior" system property to "transient",
but then the variables are cleared immediately following evaluation of
the script, making them unretrievable from the bindings afterwards.)