OAK-1418: Read performance regression

Make the Head classes in MemoryNodeBuilder static and explicitly track the
root head to avoid the performance overhead of accessing private fields of
a containing class.

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