Add a `MethodReference` class which can be used to refer to a static or instance method. See gh-28414