find_package: Save/restore PACKAGE_PREFIX_DIR

Package configuration files generated by `configure_package_config_file`
set this variable in `@PACKAGE_INIT@` and then use it later.  There may
be intervening calls to `find_package`, e.g., via `find_dependency`.
If the loaded package also used `configure_package_config_file`, it
may change the value of `PACKAGE_PREFIX_DIR`.  Explicitly save and
restore the value to avoid this.

Fixes: #25827
4 files changed