It turns out the apiprefix define is quite new (I didn't realize it at the
time) and I'd rather get FTBFS reports based on configure catching the
error than gcc catching it.
Most of the guts of configure.ac have been moved to config.d and are then
brought in by m4_include. This will make maintaining configure.ac much easier.
Also drop use of PROGRAM and VERSION, using PACKAGE_NAME, PACKAGE_VERSION, and
on occasion, PACKAGE_STRING instead, and clean out some old files we no longer
need.