vah264dec: Fix for long term reference picture signalling
Allocate a GArray which is used to fill VAPictureParameterBufferH264.ReferenceFrames (called per frame), instead of alloc/free per frame. Also this commit is to fix the condition where long-term reference picture is needed for VAPictureParameterBufferH264.ReferenceFrames entry.