Fix pipeline ref lazy commit retrieval with Gitaly
What does this MR do?
This merge requests fixes pipeline lazy reference retrieval with Gitaly, by encoding ref names and using BatchLoader loading properly.
Conformity
Closes #224523 (closed)
Edited by Grzegorz Bizon