Enable these classes to be used from JRuby

JRuby classes can not be rehydrated via reflection so I must provide the comparator myself.

I'm experimenting with adding support for these from Pacer: https://github.com/pangloss/pacer-neo4j/pull/12