Predicate: stop testing category membership as soon as possible
Cache results of category membership when search searching for predicates
Cache instanciation of predicates

Resource.asPredicate was broken and Base.asPredicate is useless.
DomainTool: small optimization of generateMultivaluedMappedValue