modules.mac_brew.latest_version: refactor to use standard methods
modules.mac_brew.latest_version: refactor to use standard methods

Also fix an error in the `pkg.latest` state function caused by a
difference in how brew reports versions for uninstalled vs installed
packages.

saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt