Add a rule for Make to build a library libnut.a

The program in the examples directory already relied on the object files being
archived, but this was not automated.

Also do a few random cosmetic changes to the makefiles.