OAK-975: Refactor KernelNodeStoreBranch
Refactor KNSB to use state pattern instead of ad-hoc case discrimination

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