Mostly rewrite the build system bits with the following changes:
- Convert to a non-recursive Automake setup.
- Convert to standard Automake variables where practical.
- Add rules to regenerate treefuncs as required.
- Avoid BUILT_SOURCES by adding accurate prerequisites.
- Remove NOINSTGLOB functionality as it seems pointless.
- Properly hook generated HTML documentation into Automake.
- Remove test bits for now, will be reintroduced later.
- Simplify configure.ac.