Modify the API to retrieve the tensor meta to check for the dimensions as well. Also fix an API mistake, the buffer whose dimensions should be checheck is the one inside the GstTensor, not another buffer some outside. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9411>