Attempt to handle interrupted `update` better

This should resolve #19460, at least in a "good enough" way.

As I noted in that thread, after resetting, any new files created during the update will still be present, but it should at least leave Homebrew itself in a usable state.