Invalidate file types cache in Git::BranchHooksService when the file or default branch is removed
The following discussion from gitlab-ce!26726 should be addressed:
I think I'm carrying over a bug here - when we delete the default branch, we should drop the cache for, say,
README.md, etc, but because we only pay attention to
new_path, we don't.
Additionally, on an update to the default branch, I think we should clear the cache if the file is removed, right?
This is a correctness thing, but if we do it after https://gitlab.com/gitlab-org/gitlab-ce/issues/60028 , we can also get a performance improvement!