FS#39 (--rebuild), FS#40 (optimized multi-target building)

Added --rebuild to combine clean and build, and optimized multi-target
building to build all targets in one pass rather than using multiple
passes.
Fix FS#41 - --clean does not remove output file