packages/pkgbuild: rewrite pkgbuild_update_vcs and get_revtime in a modular fashion.

This is in prepare for supporting pacman 4.1's new VCS repository
format.

Our new implementation supports multiple repositories with their
timestamps, though only legacy repo support (Git/SVN) exists now, being
carried from the previous implementation.
packages/pkgbuild: recognize also hg devel packages.

Just recognize, no actual support for now.
packages/pkgbuild: beautify regex in pkgbuild_deps.
packages/pkgbuild: handle unimplemented repo types in _pkgbuild_vcs_process.
packages/pkgbuild: recognize alternative ${_hgname} variable for hg repo name.
packages/pkgbuild: add fetch/update support for legacy hg repositories.