Fix isolation of processed metadata
Introduce a hash of the component metadata rules, so that we can
cache different processed metadata based on the hash. This is a
performance optimization, which allows setting different processed
metadata on the "cached metadata" instance, based on a rules hash.
The rule hash is more stable when using class-based rules. If not,
then we have instance based rules which are opaque to Gradle, meaning
that we're going to create as many instances of processed metadata
as there are rules instantiated.