OAK-1980 - Use index on non-root node

Pulling in only QueryIndex related changes from revision 1615904

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/branches/1.0@1635658 13f79535-47bb-0310-9956-ffa450edef68
OAK-2119 - AggregateIndex should support AdvanceQueryIndex

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/branches/1.0@1635659 13f79535-47bb-0310-9956-ffa450edef68
OAK-2173 - Allow specifying custom attributes in IndexPlan

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/branches/1.0@1635660 13f79535-47bb-0310-9956-ffa450edef68
OAK-2229 - Provide a way for Index implementation to determine reindex mode

Merged r1634779


git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/branches/1.0@1635661 13f79535-47bb-0310-9956-ffa450edef68
OAK-2226 Aggregate Lucene no results for multiple jcr:contains

Merging r1635108


git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/branches/1.0@1635662 13f79535-47bb-0310-9956-ffa450edef68
OAK-2119 - AggregateIndex should support AdvanceQueryIndex

Merging r1635518


git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/branches/1.0@1635663 13f79535-47bb-0310-9956-ffa450edef68
OAK-1778 Ordered index: explain plan not implemented

Copying only the changes done in QueryIndex

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