fix: unused-template warnings (#6156)

* fix: remove `static` from `type_id`

* Add -Wunused-template for Clang 18

* fix: remove `static` from `type_has_shared_from_this`

* Remove unreachable overload.

---------

Co-authored-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
3 files changed