Avoid race condition when creating parent dirs.

The switch to upload artifacts in parallel created a race condition
in the SFTP transports when two artifacts shared a common, nonexistent
parent.  Ruby's Net::SFTP::Session#mkdir doesn't fail gracefully when
the directory already exists, so some uploads were randomly failing
when two or more threads all noticed a common parent directory doesn't
exists and then tried to create it.  Unfortunately, the status code
used in this case (Net::SFTP::Constants::StatusCodes) is ambiguous
(4 = FAILURE) so we can't be too clever and try to detect when mkdir
fails because the directory already exists, and manually recover.

Rewrite the entire upload loop to first create a Net::SSH connection
to the server, then exec mkdir -p to create the parent directory,
and then switch to an SFTP channel for the actual upload itself.