Do not delete polymorphic objects without a virtual destructor (#23705)
SEI CERT C++ Coding Standard says:
> Do not delete an object of derived class type through a pointer to its
> base class type that has a non-virtual destructor. Instead, the base
> class should be defined with a virtual destructor. Deleting an object
> through a pointer to a type without a virtual destructor results in
> undefined behavior.
See https://wiki.sei.cmu.edu/confluence/display/cplusplus/OOP52-CPP.+Do+not+delete+a+polymorphic+object+without+a+virtual+destructor
Clang generally warns about this, but we disabled the warning via
-Wno-delete-non-virtual-dtor. This commit re-enables the warning and
fixes up all the code that hits the warning.