[#1707] Check that resource belongs to dataset on resource_read

Otherwise you can display resources from other datasets.

Refactored to just call package_show and not resource_show as well
there's a tiny chance that this could do the wrong thing (if someone has a dataset type of '', which probably won't work anyway) and the `or dataset` bit is meaningless in normal use because the package type column has this as its default value.

You're just moving existing code so I'll leave it. There's probably a number of other subtle dataset_type issues like this throughout the code that could be fixed together in a separate PR.