OAK-1032: SegmentMK: One SegmentWriter per SegmentNodeStore

More fine-grained synchronization of the SegmentWriter.
Better cross-segment caching of strings and templates.

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