jenkbuilder.pl: check return status of request for next build number

- Skip building the current job if the request for job details returned undef