Fix detection of next build number

If many multiple jobs are starting at the same time, it is not safe to
query next build number and then launch the job. Instead, pick up the
build number from the POST response directly.
Store triggered build environment variables

Save TRIGGERED_BUILD_NUMBER and, if blocking, TRIGGERED_BUILD_RESULT to
the build environment. Prior to this change, it was necessary to parse
the log file, which was very hacky and only possible on the master. This
can be used by later build steps and downstream jobs.