Validate build number by reading parameters

If multiple jobs are started at the same time, it can be challenging to
determine the correct build numbers for each, as Jenkins does not
respond with the build number. To help mitigate this risk, check the
expected build parameters, and if they do not match then scan +-2 build
numbers looking for the correct build.