TUSCANY-3312 - Copy JavaInterfaceFactory memory leak changes from 1.x + other related changes and some extensions to allow the cache to be reduced when contributions are unloaded in the domain node.