FindPostgreSQL: Fix regression in computation of library directory
Since !3298 (merged) the PostgreSQL_LIBRARY
variable may contain a list and therefore should not be passed to the get_filename_component
command directly. Instead spell out the logic to compute PostgreSQL_LIBRARY_DIR
from one of the per-configuration variables.
Fixes: #19444 (closed)