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.
What is this here for? Do you want to ensure to not retain the build after this method returns?