Change check_PROGRAMS to EXTRA_PROGRAMS

This change allows lazy compilation of test programs. As a result, other
tests can be run even when some tests cannot be compiled.

This change also reduces the useless "X is up-to-date" logs in runtime.
Merge all Makefiles into one

See the paper by Peter Miller for the reasons to avoid recursive make:
http://miller.emu.id.au/pmiller/books/rmch/
Merge pull request #68 from magicant/chore/makefile

Improve Makefile