Search for psurface using pkg-config

The upcoming psurface version 2.0 will support pkg-config.  This patch changes
the test for psurface such that it will first look for psurface using pkg-config,
and if nothing is found, then the old test without pkg-config will be run.
Hence old and new psurface versions are supported.

You do need the new version for psurface-2.0, though, because only that one will
set the proper compiler and linker flags if psurface has been built with
hdf5 support.
(cherry picked from commit 326c0a98c5b523e576e841c4f91902605a526d72)
Ignore *.log and *.trs files

After a recent update from Debian wheezy to Debian testing, my build system
started writing those into the test directories...
(cherry picked from commit fb09794be77f1487ab2dc15ff2e2de58709fefc3)
Fix a small grammar error.
(cherry picked from commit a47ba62a184dc4d2b5310464291aa1564e8d2063)