Avoid using ci_refs.tag as booelan

The following discussion from !16951 (merged) should be addressed:

  • @ayufan started a discussion:

    This replicates an existing structure of ci_pipelines. This structure actually has a deficiency where tag is ambiguous and is unable to model different ref types, like Merge Requests, etc.

    For example, this is good feature to start tracking Merge Requests state change of pipelines via ref.

Edited by 🙈 jacopo beschi 🙉