arch-nspawn: Set machine name

Recent changes to systemd-nspawn have it take the machine name from
the chroot dir name, which isn't unique enough for our setup.
lib/common.sh: Introduce locking helper functions

Reduces code duplication.

With makechrootpkg not calling mkarchroot anymore,
the lock handover protocol is unneeded.

arch-nspawn does not do any locking, so add protection to archbuild.
makechrootpkg: Remove add_to_db feature

I don't think this is much use in our common workflow. Our pacman
configs don't even make a reference to /repo.
makechrootpkg: Avoid parsing PKGBUILD and support VCS sources

 - Ensure sources are available before entering chroot
 - Bind STARTDIR and SRCDEST into the chroot read-only
 - Refactor makechrootpkg and introduce meaningful functions

Avoids copying stuff from/to the chroot as much as possible. With
VCS sources these copies can get quite expensive.