Enabling use of smart_holder for types with non-public destructors. (#2878) * Enabling use of smart_holder for types with non-public destructors. * Resolving clang-tidy error (GitHub CI).