OAK-924: Optimize namespace lookups

Make LocalNameMapper a concrete class with a direct Map<String, String>
member variable that contains the local namespace remappings

Make SessionNamespaces extend from LocalNameMapper to streamline
access to namespace mappings. Also streamline the NamespaceRegistry classes.

Drop the snapshot mapping and the NamespaceRegistry references from
SessionNamespaces and instead use direct content lookups. With the
new content structure this is no longer slow like it used to be.

Synchronize access to all name mapping methods to avoid possible
concurrency issues

Treat the default empty namespace as a given, so it doesn't need
to be stored in the namespace registry

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1563143 13f79535-47bb-0310-9956-ffa450edef68
OAK-411: Validator for node type management

Make the regex pattern static to avoid repeated compilation

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1563146 13f79535-47bb-0310-9956-ffa450edef68
OAK-1380 Restore from backup utility class

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1563802 13f79535-47bb-0310-9956-ffa450edef68
OAK-710 : PermissionValidator: Proper permission evaluation for moving/renaming nodes (wip)

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1563874 13f79535-47bb-0310-9956-ffa450edef68
OAK-608: revert changes made in rev. 1560563 internal classes being exported

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1563915 13f79535-47bb-0310-9956-ffa450edef68
OAK-1369 XPath queries: compatibility for missing @ in front of property names

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

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1563951 13f79535-47bb-0310-9956-ffa450edef68
OAK-1382: oak-core tests may run out of memory

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1564224 13f79535-47bb-0310-9956-ffa450edef68
OAK-1382: Tests in oak-core and oak-jcr may run out of memory

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1564234 13f79535-47bb-0310-9956-ffa450edef68
OAK-1322: Reduce calls to MongoDB

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1564235 13f79535-47bb-0310-9956-ffa450edef68
OAK-1383 Reduce memory usage of the cache

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1564238 13f79535-47bb-0310-9956-ffa450edef68
OAK-1383 Reduce memory usage of the cache

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1564240 13f79535-47bb-0310-9956-ffa450edef68
OAK-834: Efficient copying of binaries across repositories
If available use reference of underlying blob instance in ValueFactoryImpl to prevent copying the actual binary.

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1564277 13f79535-47bb-0310-9956-ffa450edef68
OAK-834: Efficient copying of binaries across repositories
Implement getReference() for KernelBlob

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1564297 13f79535-47bb-0310-9956-ffa450edef68
OAK-1364 CacheLIRS concurrency issue (allow concurrent clear and refresh without loader)

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1564322 13f79535-47bb-0310-9956-ffa450edef68
OAK-1384: Background write does not update all _lastRev

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1564331 13f79535-47bb-0310-9956-ffa450edef68
OAK-1374: Async indexer fails on the SegmentMK

The property record could be on a different segment than the blob value,
so avoid throwing away the segment identifier included in the RecordId.
The SegmentBlob instance will automatically resolve the correct segment.

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

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1564336 13f79535-47bb-0310-9956-ffa450edef68
OAK-1374: Async indexer fails on the SegmentMK

Add a test case

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1564366 13f79535-47bb-0310-9956-ffa450edef68
OAK-1329: Relaxed JCR locking behavior

Allow a user that owns a lock to retrieve it's token even with a session
that does not currently hold the lock

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