More build fixes

This is the next round of changes for the build system. The first three sanitize the clean target. The rest continues to refactor the Makefile, eliminate unnecessary duplication and generally rely on Make features rather than shell and stamps files to drive the build.