Return a batched promise of uploads

Return a jQuery promise from 'upload_file' and return a $.when of all
upload promises from 'upload'.