Fix oversights in creating the build and add ability to clean builds.

When a project is deleted all the associated builds for that project
ought to be deleted as well.