Make the PipelineUpdateWorker idempotent

Part of #178 (closed)

The PipelineUpdateWorker processed 300k "duplicate" jobs the past 7 days, and spent 8 hours on that. Duplicate jobs are jobs that get scheduled when there is already a job in the queue for the same worker with the same arguments.

If the job was (marked as) idempotent, we would be able to deduplicate those jobs when they get scheduled.

Similar to #285 (closed), this updates the status of a pipeline based on the statuses of builds within it. We can already mark it as idempotent, ad the specs and deduplicate.

Edited by Bob Van Landuyt