h264: Refactor ff_h264_decode_ref_pic_list_reordering

In preparation for MVC support.