tests: Convert to the new parallel test harness

automake 1.11+ allows us to define a custom test runner, so the test
cases can be defined as trivial "*.pipe" and "*.ref" files; a common
runner script "pipe-wrapper.sh" executes each one and checks the output
against a known-good result.

The most immediate need for this change is to fix bug #14
("make -j4 check" fails due to hardcoded temp filenames), but it should
also make it easier to add new tests in the future.

Reported-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
autogen: Create m4/ directory if it doesn't exist

Some versions of aclocal apparently require this:

    autoreconf: running: aclocal --force -I m4
    aclocal: couldn't open directory `m4': No such file or directory
    autoreconf: aclocal failed with exit status: 1

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>