Fix stats bug, not zeroing num_nodes variable

Bug was introduced way back when we broke the stats out
into their own class. (Not sure how it went undetected for so
long, possible previous compiler I was using zeroed this out
for some reason.)
Clean up the makefile.

- don't clutter up src directory with object files and other generated files
- don't use the cppflags file anymore.
- support unit tests.
Create bitops.{h,cc} and tests

Basically merged code from countbits, countmoves, and lastbit.
Use namespaces to hide all the unneeded bits. But still leave things available
for unittests and for inlining.
Remove unused code