Add support for refresh_db in brew

It appears that refresh_db became a feature that package managers are require to support as `KeyError: 'pkg.refresh_db'` was the error I was getting before this commit. I've not had a chance to fully test this fix, so I'd appreciate anyone else taking a look at this.
Merge pull request #8935 from jasonrm/patch-1

Add support for refresh_db in brew