data: add dav1d_data_ref()

Makes both picture and data modules more consistent API wise, and
does a few extra validation checks for the input arguments.
14 jobs for master in 5 minutes and 10 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Style
passed #246561
amd64 debian
style-check

00:00:23

 
  Build
passed #246562
amd64 debian
build-debian

00:00:31

passed #246567
debian aarch64
build-debian-aarch64

00:01:18

passed #246568
debian aarch64
build-debian-aarch64-clang-5

00:01:01

passed #246563
amd64 debian
build-debian-static

00:00:34

passed #246570
debian aarch64
build-debian-werror

00:00:32

passed #246564
amd64 debian
build-debian32

00:00:25

passed #246569
macos
build-macos

00:00:27

passed #246565
win32
build-win32

00:00:33

passed #246566
win64
build-win64

00:00:34

 
  Test
passed #246571
amd64 debian
test-debian

00:00:46

passed #246572
amd64 debian
test-debian-asan

00:02:01

passed #246573
amd64 debian
test-debian-msan

00:01:02

passed #246574
amd64 debian
test-debian-ubsan

00:01:21