Check whether heavy caching in `class_for_class` can be removed

According to https://gitlab.com/alexkalderimis/declarative-policy/-/blob/4f0d1ab3598c9bd8f3debd56224a8f0941f7f7c5/lib/declarative_policy.rb#L64:

    # This method is heavily cached because there are a lot of anonymous
    # modules in play in a typical rails app, and #name performs quite
    # slowly for anonymous classes and modules.
    #
    # See https://bugs.ruby-lang.org/issues/11119
    #
    # if the above bug is resolved, this caching could likely be removed.

It seems that https://bugs.ruby-lang.org/issues/11119 has been resolved and closed so we should check whether this caching is still needed.