Fix compare_to for to_java'ed Ruby objects

Flip incorrect nil check which was resulting in #compare_to always
returning 0 for many to_java'ed Ruby objects (anything not internally
represented by a class which overrides RubyBasicObject#compareTo)
Merge pull request #1626 from dmarcotte/test-compare-to

Fix compare_to for to_java'ed Ruby objects