fixed a bit of inefficiency
Resurrected the checkoutBranch method.

For reasons I specified in javadoc, I find methods with more predictable,
robust semantics more useful in the context of Jenkins. For example,
"git checkout branch ref" is too sensitive to whether the branch already
exists or not, and while such sensitivity is probably useful to prevent
human errors from ruining changes, I find them rarely useful for programs.

See git-plugin 543c31940871c85d7d3d09c31b8e321371943480 for example
where git plugin wants this kind of predictable checkout behaviour.