Fixes the installation of the pkgconfig file and the static library when installing only the Kernel
component.
This is a followup to fix #30835 and #30814, which were merged shortly after one another, but are interrelated. Can be tested with:
0cmake -B build -DBUILD_SHARED_LIBS=OFF -DBUILD_KERNEL_LIB=ON
1cmake --build build --target bitcoinkernel
2cmake --install build --component Kernel