Generated method populators use `putMethod` directly to avoid the
overhead of invalidating method caches before any user code runs,
but this breaks when a generated populator is used after boot time.
As described in jruby#9196, this can cause methods added by
generated populators to be shadowed by previously-cached results,
such as the undefined marker cached for missing methods.
The logic here modifies the generated populators to invalidate any
classes they've modified, but only once per populator and only if
we are no longer booting the JRuby core classes.
This includes a fix and test for invalidating method caches on classes modified by our generated populators (from AnnotationBinder). If we are booting core, no invalidation happens, but for extensions loaded after that point we should be invalidating to avoid leaving shadow cache entries as described in #9196.