[#1010] Catch NotFound on new resource when package does not exist

Catch ckan.logic.NotFound exceptions raised when trying to create a new
resource for a package that doesn't exist. This turns a 500 Server Error
into a proper 404 Not Found. Fixes #1010.