Some Generalizations

This pull request includes various changes we've make to xcode_builder to be more flexible so we can use it in our environment. I can split these into separate pull requests if that's better, or maybe merge into just one, let me know.

Hope these are helpful - happy to answer any questions.
More than that.  By default xcode will create builds under ~/Library/Developer/Xcode/DerivedData/etc.  This method allows calling code to figure out exactly where that is (its the TARGET_DIR key in the resulting hash table).  This is an alternative to specifying  build_dir.  In our case, we prefer to stick with the xcode defaults thus this is needed.