buffer: improve arg checking
buffer: improve arg checking

Allow idx == 0 and length == -1 on empty buffers for the _range methods.

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