Fix the build on Linux/clang.

Also do a little bit of tidying up.
Formatting, yay!

Also, as an added bonus, add formatting target to Makefile.  You can now
do `make format` to clang-format all of the non-contrib source.