OAK-1198: Retry InMemory merge
- added test
- implemented a retry logic similar to the one in SegmentNodeStoreBranch

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