Use a generic check script in test/Makefile.am
This is a rewriting of the testing mechanism, which used to be
heavily based on copy-pasting of parts of the test/Makefile.am
file. It introduces a generic testing script (test/checker.sh)
and a set of very small scripts (test/check_*.sh), dedicated to
a given test set and typically limited to one call to the generic
script. All in all this is a cleaner approach, with less redundant
script code and more integration with Automake's testing
support (TESTS and TEST_ENVIRONMENT variables).
The benefit for the remaining rules is less obvious but it may
be considered as well at some point.