Be more selective when invalidating code instances
On master, when we invalidate a CodeInstance, we also invalidate the
entire associated MethodInstance. However, this is highly problematic,
because we have a lot of CodeInstances that are associated with
`getproperty(::Module, ::Symbol)` through constant propagation.
If one of these CodeInstances gets invalidated (e.g. because
the resolution of const-propagated M.s binding changed), it
would invalidate essentially the entire world.
Prevent this by re-checking the forward edges list to make sure
that the code instance we're invalidating is actually in there.