test: fix compiler warnings.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
configure: frob variables properly, use Makefile.in.

Basically a rewrite of our build system, so it's not recursive.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>