bundle: upload zar just once

Before, the zar would be uploaded once per group of nodes. We now
upload it just once and refer to it in all the groups.
deploy: extract function for generating job description