JCR-3521 fix comparable contract violation which breaks search sort on Java 7: applying patch by Chetan Mehrotra

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1446512 13f79535-47bb-0310-9956-ffa450edef68