Split out library and tests.

Rewrote Makefile to generate library and link that into the standalone
compiler. Put include files into a proper include directory. Also
compiles and runs a unit-test binary. Also does debug better.