OAK-1294: Avoid purging transient changes when rebasing branches
Change rebase implementation to rebase persisted branch followed by rebasing in memory changes on top of the head of the rebased branch.

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