brew: Add pkg.upgrade support

Minor dependency on #11115 fixing `list_pkgs` in the brew module, since it returns the same set before and after the upgrade in almost all cases, so despite the upgrade working fine, the status report is misleading.