Ability to cache external builds

In lookup_package, it is now possible to set the CHECK_EXTERNAL option in conjunction with the
DOWNLOAD_BY_DEFAULT option. In that case, it is first checked whether the packages exist in (and
strictly in) the EXTERNAL_ROOT directory. This makes it possible to cache external builds between
build directories and/or codebases.