(#19558) Add resource and manifest context to type validation failures

When a resource fails validation with a validate method defined at the type level (rather than individual parameters), provide additional context with the resource name, manifest file and line number.

Plus 2 related commits.