We used to validate intrinsic functions in the ResourceDefinition by just
passing it to function.validate(). That worked when it also acted as a
CloudFormation template snippet but, since that behaviour was removed by
2c6fc7bcd6, that call now does nothing. This
replaces it with a validate() method on the ResourceDefinition itself.
This also improves path reporting for validation errors in deletion or
update policies.
Change-Id: I58c788002136ddf9bded309366e2072823b3ac77
Closes-Bug: #1732798