buffer: simplify and refactor _span and _merge
buffer: simplify and refactor _span and _merge

Unify the _span and _merge code paths and simplify now that we only use this
internally.

surround-io/gstreamer,ensonic/gstreamer,cfoch/gstreamer,lovebug356/gstreamer,jpxiong/gstreamer,lubosz/gstreamer,justinjoy/gstreamer,Lachann/gstreamer,jpakkane/gstreamer,krichter722/gstreamer,justinjoy/gstreamer,justinjoy/gstreamer,krieger-od/gstreamer,mparis/gstreamer,collects/gstreamer,mparis/gstreamer,jpxiong/gstreamer,ensonic/gstreamer,lovebug356/gstreamer,cablelabs/gstreamer,krieger-od/gstreamer,centricular/gstreamer,justinjoy/gstreamer,krichter722/gstreamer,Lachann/gstreamer,krieger-od/gstreamer,lubosz/gstreamer,jpxiong/gstreamer,cablelabs/gstreamer,collects/gstreamer,jpakkane/gstreamer,surround-io/gstreamer,lubosz/gstreamer,Lachann/gstreamer,Lachann/gstreamer,centricular/gstreamer,jpakkane/gstreamer,lovebug356/gstreamer,ensonic/gstreamer,cfoch/gstreamer,mparis/gstreamer,krieger-od/gstreamer,lubosz/gstreamer,centricular/gstreamer,lovebug356/gstreamer,surround-io/gstreamer,mparis/gstreamer,StreamUtils/gstreamer,krieger-od/gstreamer,collects/gstreamer,Lachann/gstreamer,jpxiong/gstreamer,StreamUtils/gstreamer,shelsonjava/gstreamer,ensonic/gstreamer,cfoch/gstreamer,krichter722/gstreamer,krichter722/gstreamer,centricular/gstreamer,cablelabs/gstreamer,cfoch/gstreamer,cfoch/gstreamer,cablelabs/gstreamer,collects/gstreamer,shelsonjava/gstreamer,shelsonjava/gstreamer,collects/gstreamer,justinjoy/gstreamer,centricular/gstreamer,cablelabs/gstreamer,jpxiong/gstreamer,lovebug356/gstreamer,shelsonjava/gstreamer,StreamUtils/gstreamer,lubosz/gstreamer,ensonic/gstreamer,shelsonjava/gstreamer,StreamUtils/gstreamer,jpakkane/gstreamer,StreamUtils/gstreamer,krichter722/gstreamer,surround-io/gstreamer,jpakkane/gstreamer,surround-io/gstreamer,mparis/gstreamer