Add holder caster traits tests in test_smart_ptr.cpp,py (#5603)

* Add test_smart_ptr.cpp,py holder_caster_traits_test

* [skip ci] Resolve clang-tidy error with a NOLINT

Tested with clang-tidy locally.
3 files changed