[ONNX] Improve error handling for adaptive_pool (#43032)
Summary:
This would also improve error handling for interpolate with 'area' mode.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/43032
Reviewed By: malfet
Differential Revision: D23398534
Pulled By: bzinodev
fbshipit-source-id: f2d60d40340f46e7c0499ea73c1e39945713418d