Consolidate CI status SVG JavaScript logic
We access CI status icons in different ways across Vue components. We need to DRY that up. Needed as part of https://gitlab.com/gitlab-org/gitlab-ce/issues/30882
MR: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10704