OAK-1861: Limit memory usage of DocumentNodeStore.readChildren()

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1603748 13f79535-47bb-0310-9956-ffa450edef68
Merge branch 'upstream-trunk' into OAK-1717
OAK-1717 Concurrent updates of ordered index in cluster may fail

refactoring for generalising some code and avoid copy-paste
OAK-1717 Concurrent updates of ordered index in cluster may fail

intermediate commit before big refactoring