decoder: h264: simplify and optimize reference frame store updates.