[QNN EP] Fix Pool builder assert in Debug build. (#25788)
### Description
In PoolOpBuilder,
- Revise the check to exploit ORT macros.
- Fix invoking the function for 5D cases.
### Motivation and Context
Refer to https://github.com/microsoft/onnxruntime/issues/25778.
Pool builder incorrectly invokes a function calculating 4D shape in 5D input, which originally expects 3D cases only. However, the check used assert to validate the shape, which did not work in Release nor RelWithDebInfo builds.