hammer.git: unify pkg_cleanup

Having two cleanup functions is error-prone, just make pkg_cleanup
to work always.