Lexer support for JRuby.

JRuby now passes all tests. Benchmark wise it completes the big XML benchmark
in about 500-600 milliseconds.