Move pgfnames() from libpgport to libpgcommon

It requires pstrdup() from libpgcommon.