Methods that end in _formula should only accept a formula
cleanup: factor out unqualified cleanup code
cleanup: use early return rather than method-spanning conditional
cleanup: rename method for consistency
cleanup: remove redundant condition

If f.installed? is true, f.rack.directory? will always be true as well.
cleanup: use subdirs, avoid .directory? checks
cleanup: use Pathname#rmtree instead of FileUtils
cleanup: only map dirs to kegs once
cleanup: refactor cleanup_formula
cleanup: rename variable
cleanup: refactor cleanup_cache
cleanup: cleanup_all => cleanup_cellar
prune: add dry-run mode
cleanup: enable prune during dry-run mode

Closes #19826.