JENKINS-23896 Give CommandInterpreter.join(Proc p) access to Build

The CommandInterpreter.join(Proc p) method is supposed to be an extension
point to allow an UNSTABLE build result to be set, but it has no access to
the Build object with which to do so.

Add a getBuild() method that returns the build passed to perform(...). A better
API would be a new join(...) with more arguments, but that'd break out of tree
plugins that might already be using this for other purposes.
So it should be `volatile`.

AFAICT the locations aren't that great: Set `null` in the outer `finally`, and set the real value just before the outer `try`.