`AbstractInterpreter`: define `add_invalidation_callback!` utility (#51769)
It seems we're reaching a consensus on how the external
`AbstractInterpreter` utilizes user invalidation callbacks. Let's
establish a utility within `Core.Compiler` for this purpose, which
cannibalizes the pattern, so that external packages can easily access
and use it.
Furthermore, with this commit, gf.c has been adjusted so that each
invocation of `invalidate_method_instance` invokes user callbacks. This
adjustment eliminates the need for user callbacks to traverse
(unstable and internal) backedge lists by themselves.