gstreamer-base/adapter: Add error checking at the bindings level
Instead of running into (inconsistent even) assertions inside the C code.
Also don't return uninitialized data and signed offsets from the masked_scan() functions.
Fixes #298 (closed)