gstbuffer: add additional checking for writability
gstbuffer: add additional checking for writability

Check for metadata writability when setting caps on buffer or when copying
metadata flags. Only enable these extra assertions in git versions.
This should help us find bad elements.

magcius/gstreamer,ensonic/gstreamer,Lachann/gstreamer,surround-io/gstreamer,shelsonjava/gstreamer,mparis/gstreamer,collects/gstreamer,drothlis/gstreamer,centricular/gstreamer,cfoch/gstreamer,centricular/gstreamer,mrchapp/gstreamer,cablelabs/gstreamer,drothlis/gstreamer,lovebug356/gstreamer,justinjoy/gstreamer,cfoch/gstreamer,ensonic/gstreamer,jpxiong/gstreamer,ahmedammar/platform_external_gst_gstreamer,Distrotech/gstreamer,StreamUtils/gstreamer,lovebug356/gstreamer,surround-io/gstreamer,centricular/gstreamer,StreamUtils/gstreamer,ahmedammar/platform_external_gst_gstreamer,Lachann/gstreamer,mrchapp/gstreamer,cablelabs/gstreamer,Lachann/gstreamer,collects/gstreamer,cfoch/gstreamer,drothlis/gstreamer,ylatuya/gstreamer,lovebug356/gstreamer,Lachann/gstreamer,krichter722/gstreamer,cablelabs/gstreamer,jpakkane/gstreamer,mrchapp/gstreamer,lubosz/gstreamer,krichter722/gstreamer,mrchapp/gstreamer,shelsonjava/gstreamer,justinjoy/gstreamer,surround-io/gstreamer,jpakkane/gstreamer,mrchapp/gstreamer,Distrotech/gstreamer,cfoch/gstreamer,lubosz/gstreamer,jpakkane/gstreamer,lubosz/gstreamer,StreamUtils/gstreamer,Distrotech/gstreamer,ahmedammar/platform_external_gst_gstreamer,centricular/gstreamer,cablelabs/gstreamer,ylatuya/gstreamer,cablelabs/gstreamer,jpakkane/gstreamer,jpxiong/gstreamer,cfoch/gstreamer,Distrotech/gstreamer,Lachann/gstreamer,centricular/gstreamer,krieger-od/gstreamer,StreamUtils/gstreamer,krieger-od/gstreamer,ensonic/gstreamer,ensonic/gstreamer,StreamUtils/gstreamer,mparis/gstreamer,mparis/gstreamer,drothlis/gstreamer,magcius/gstreamer,surround-io/gstreamer,justinjoy/gstreamer,krieger-od/gstreamer,lovebug356/gstreamer,krichter722/gstreamer,collects/gstreamer,krieger-od/gstreamer,ylatuya/gstreamer,lovebug356/gstreamer,jpxiong/gstreamer,surround-io/gstreamer,krichter722/gstreamer,krieger-od/gstreamer,mparis/gstreamer,shelsonjava/gstreamer,Distrotech/gstreamer,collects/gstreamer,ylatuya/gstreamer,justinjoy/gstreamer,ahmedammar/platform_external_gst_gstreamer,mparis/gstreamer,shelsonjava/gstreamer,krichter722/gstreamer,magcius/gstreamer,lubosz/gstreamer,ylatuya/gstreamer,ensonic/gstreamer,jpxiong/gstreamer,magcius/gstreamer,drothlis/gstreamer,magcius/gstreamer,shelsonjava/gstreamer,collects/gstreamer,lubosz/gstreamer,jpxiong/gstreamer,ahmedammar/platform_external_gst_gstreamer,justinjoy/gstreamer,jpakkane/gstreamer