OAK-2077: Improve the resilence of the OrderedIndex for dangling links

tracked a warning when a dangling link is enountered and in case it
happens during an insert it attempts to clean it up.

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