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)