Fix get_key/value in the Java API for complex cursors.
closes #493