phantomjs: general tweaks and cleanup.
download_strategy: fix Git repo updating.

Git repositories should always be updated when the ref is a branch.
They should be also updated if no ref was specified or if the ref isn’t
present. This stops the repo being updated if we’re building a specific
revision and it is present. Additionally, this stops the update barfing
on repositories where we’re using a revision and there is no upstream
`master` branch.

Closes #29218.
move method
fix sysroot shenanigans
keep path arrays homogeneous
don't need to augment path on Xcode-only 10.9
re-enable xcode-only on 10.9