Refactor the MirPass for QualifyAndPromoteConstants
#63994
Merged
MirPass for QualifyAndPromoteConstants
#63994