OAK-901: Test root node type is not reported correctly

Track the declaring node type in the pre-compiled lists of named and
residual item definitions, so we can filter them per type. This fixes
the problem where NodeTypeImpl.getDeclared*Definitions() would return
also inherited definitions, not just those declared in that node type.

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