adding upload_archive_from_ref

As an option to upload_archive, which takes a file path, adding
upload_archive_from_ref which takes a reference to data, so you
don't have to write it out to the filesystem if you already
have it in memory.

Here's a separate pull request, the other one doesn't seem to have come through.  Sorry if I'm causing you extra work, I'm not good at github :-/