Remove `ComEnumerator` as COM objects using IEnumerator is now supported in .NET 5 by daxian-dbw · Pull Request #13259 · PowerShell/PowerShell

PR Summary

Fix #12881

.NET 5 now support COM objects using IEnumerator (IEnumVARIANT) (the fix is in .NET 5 preview 7), so in our code, the ComEnumerator, that handles IEnumVARIANT can be removed.

The ComEnumerator was introduced in #4553 3 years ago to make PowerShell able to enumerate COM object.
The support for COM objects that use IEnumerable was back in .NET 3.1, so #11795 reverted some of our changes.
This is a follow-up PR, to remove the remaining ComEnumerator code since now .NET 5 finally supports COM objects that use IEnumerator.

No new test is needed.

PR Checklist