Update dependencies when gem is destroyed

This code makes sure `Dependency` records get the `unresolved_name` set when a `Rubygem` that they are referencing is destroyed.

Will hopefully help with preventing issues like #574.
I did not find any calls to `Rubygem#destroy` in the code, but I think it makes sense to have a complete destruction routine in place.