Refactor after_commit hooks to use status state machine for subscriptions

Why

This method is brittle as stated here: https://gitlab.com/gitlab-org/quality/e2e-test-issues/-/issues/1022#note_2748309310

What

Avoid using after_commit and saved_change_to_status? in app/models/ci/pipeline.rb and elsewhere. Instead use the status state machine as seen in !205098 (diffs)

Edited by 🤖 GitLab Bot 🤖