[zsh] Trigger rehash after installing new things.

Wrap system management functions (brew, dpkg, apt-get, etc.) to create a
file in /tmp indicating that system management occurred. Install a
preexec hook which checks for that file and intelligently calls hash -r
if needed.