Fix missing Groovy/Scala classes in runtime variant By using the infrastructure built in `JvmPluginsHelper` we can now make sure that the languages we support expose their classes on the "classes" variant.
Add test showing consuming a Groovy library may be broken The Java library, as well as the Java library plugins define a "classes" variant, that is "for runtime" use. There is, currently, no code that would explicitly require this variant. However, if, and only if, a configuration is wired to do so, then Groovy classes become "invisible" to the consumer.
This is similar to #7398 and #8788 but for "runtime" use. This didn't surface as a problem because for runtime we always ask for jars, so the test is here to prove that if we ask for a more specific variant then we have the problem.