Prevent cleanup if more than one pipeline is running on the branch
When multiple parallel pipelines run on the same branch, the
faster pipeline would clean the images that slower pipelines still
need, causing those pipelines to fail due to missing images.
This commit prevents this race condition in a somewhat "hacky" way
Fixes #289 (closed)