h264: split remove_reference_at() into finer units.
h264: split remove_reference_at() into finer units.

Split remove_reference_at() into a function that actually removes the
specified entry from the short-term or long-term reference picture array,
and a function that sets reference flags to the desired value, possibly
zero. The latters marks the picture as "unused for reference".

01org/iotg-lin-gfx-gstreamer-vaapi,ceyusa/gstreamer-vaapi,gbeauchesne/gstreamer-vaapi,CapOM/gstreamer-vaapi,GStreamer/gstreamer-vaapi,GStreamer/gstreamer-vaapi,01org/iotg-lin-gfx-gstreamer-vaapi,01org/iotg-lin-gfx-gstreamer-vaapi,CapOM/gstreamer-vaapi,ceyusa/gstreamer-vaapi,gbeauchesne/gstreamer-vaapi,CapOM/gstreamer-vaapi,gbeauchesne/gstreamer-vaapi