get_installed_pkgconfigs: improve error handling, add logging

Port to newer Python 3 API, don't wrap everything with try/catch,
and add some logging for failed pkg-config commands.

See #54
4 jobs for master in 7 minutes and 21 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Test
passed #552889
test-py3

00:02:01

passed #552890
ub19.04-py3-glib

00:07:21

 
  Deploy
passed #552891
pages

00:00:25

passed pages:deploy

00:00:02