gstreamer-base/adapter: Check arguments before calling adapter functions
There are various pre-conditions on the state of the adapter, e.g. it will give an assertion in the C code to try taking more bytes than are available.
These should be checked at the bindings level and be converted into panics or returning a reasonable "empty"/default value.