More fixes/cleanups/simplifications to make ratfor build

It builds now, but the build system is still messed up, the testsuite
doesn't work, and I don't even want to begin to think about how hard
"make distcheck" will fail.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>