discover/resource: Provide resolve_resource_against_device