Rewrite `brew reinstall`

Fixes #23928.
Homebank 4.5.6

Closes #27575.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>