The inner class metaspace cleaning was moved out of do_unloading() so that we could support concurrent class unloading. The place chosen for this cleaning was safepoint cleanup tasks, with a couple of flags to enable it only for full GCs.
Move it instead to ClassLoaderDataGraph::purge, where we know we have full GC, and trigger the cleanup in the ServiceThread if concurrent class unloading. The inner metaspace cleanup still requires a safepoint because it has MetadataOnStackMark and cannot have intervening class redefinition.