Use AC_CONFIG_HEADERS in place of AM_CONFIG_HEADERS for autmake 1.13 compat

Patch from cazfi.
Rename configure.in to configure.ac to appease newer autoconfs
Avoid using top_srcdir in TESTS-new automakes do not like this
Merge remote-tracking branch 'origin/patches-2.0'

This is an "ours" commit: I'm not taking the recent autotools changes
from patches-2.0, since they'd conflict with master.
Use AC_CONFIG_HEADERS in place of AM_CONFIG_HEADERS for autmake 1.13 compat

Patch from cazfi.
Avoid using $(top_srcdir) in TESTS.

Newer automakes don't like this.