Move implementation of build retry to the separate class
Business rules related to retrying the build are more complex with each release.
Since we introduce asynchronous pipeline processing and extended CI pipeline with state machine implementation this is even more tricky to retry build now.
We will benefit from moving implementation of build retry to the separate class, with some increased focus on writing unit tests for that.
/cc @ayufan @markpundsack