h264: move building the reference list out of h264_slice_header_parse()