OAK-1584: Performance regression of adding and removinf child nodes after OAK-850

Optimize the ordering operations from O(n log n) to O(n)

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