Convert more K&R code to ANSI C
Tweak make_dist.sh
Improve build system further

* Makefile now honors {C,CPP,LD}FLAGS and LIBS as determined by configure
* uses MKDIR_P and SED, from autoconf, for improved portability
* added a check whether -lm is provides log10, instead of hardcoding its use
* regenerate all autoconf related files
testPq: get rid of tst/GAP and VERSION