Improve handling CI/CD YAML files in pipeline model
Description
How we handle CI/CD YAML files in pipeline model might benefit from some improvements.
Currently it is quite error prone, an d we can run into problems with config_source. We set it in after_initialize, but at this point we don't yet have sha or other pipeline attributes present, so it not always works - it does not with FactoryGirl, for example).
There are other pain points like Ci::Pipeline.ci_yaml_file that does not follow CQS and asking a question actually changes the pipeline object. Should we handle this in CreatePipelineService?
Let's keep this issue to track work on improving the underlying implementation of pipeline configuration and phasing config processor out of the pipeline.
Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/37563