hammer.git: support relative package and git repository addresses

If a package or git URL is not absolute, it will be assumed to be relative
to PKG_GIT_BASE and PKG_URL_BASE environment variables. This allows user
to set up a local server containing all the packages and git repositories.