Proper use of generics

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1632256 13f79535-47bb-0310-9956-ffa450edef68
OAK-2202 - OrderedIndex should not return the whole index on
property=$value statement

used a single key fetch where possible and increased unit test coverage

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