Grouping shift leader

As my workflow included having JPGs as group leaders until I changed them, I was in trouble as a recent change always prefered RAWs. So I thought it might be good to have a way to change the leader for a lot of images at once.

This is my first contribution to any project on github and c/c++ as well, so please be gentil...