mkimage-arch: use hash to check if command is available

Apart from having more predictable return codes on various operating
systems, it additionally caches the path to application.
mkimage-arch: provide and use own pacman.conf