Change Makefile.am so that we can run unit tests with `make check`.

Test programs should be listed in `check_PROGRAMS` instead of `bin_PROGRAMS`. Users might not want to install the test programs.