Improve removal of dead calls to allocator helpers.
This change improves detection of allocators with side effects.
Allocators can cause side effects if the allocated object may have a finalizer.
This change adds a pHasSideEffects parameter to getNewHelper JitEE interface
method. It's used by the jit to check for allocator side effects instead of
guessing from helper ids.
Fixes dotnet/coreclr#21530.
Commit migrated from https://github.com/dotnet/coreclr/commit/
eea057675de7914af12c6168db0f3bebea35be5b