Improvements to task launching logic

We should only start preparing and launching build tasks after declining all of the other offers in this batch. If we don't, Portainer will hold on to resources while it is preparing and uploading assets for a build task.