OAK-1332: Large number of changes to the same node can fill observation queue

Optimize and clean up the code for detecting reorderings

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