rm homebrew-fork extend Pathname#rmdir_if_possible

integrate a modified version into our codebase as a utility
method (no longer a monkeypatch)
Merge pull request #8427 from rolandwalker/homebrew_remove_extend_pathname_rmdir_if_possible

rm homebrew-fork extend Pathname#rmdir_if_possible