OAK-1719: Missing commit hooks in upgrade

Add an editor for upgrading rep:glob entries in existing Jackrabbit Classic ACEs to the rep:restrictions structure used in Oak
Make the RepositoryUpgrade class easier to extend and customize.
Use the after instead of the before state to get privilege bits in PermissionHook, as otherwise newly added privileges won't be reflected in the permission store.
Also: Avoid NPE in SegmentNodeState.getStringValue("jcr:primaryType") in the unexpected case when a primary type is not set.

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