xbps-src: move check_installed_pkg() to build_dependencies.sh.