[xctool] reduce build-tests overhead by invoking xcodebuild only once 

Attempt number 2 of #43, but this time with tests modified to work with the new behavior (and a bug fix caught by said tests).