GRAILS-11221: Fix forked mode classpath to prefer target/classes and res...

...ources ahead of other BuildConfig dependencies.

This specifically fixes this issue but may actually address other cases where the classpath seems to vary in forked mode. For instance, for us, we had some src/java config.groovy classes that didn't seem to get picked up in forked mode (since they were in the resources directory). With this change, they are now working again.