Make `jl_reinit_foreign_type` idempotent even with asserts (#60827)
That is, if it is called twice (e.g. because precompilation is disabled)
with identical arguments, then this should not trigger an assertion.
This should resolve https://github.com/oscar-system/GAP.jl/issues/1314
(cherry picked from commit 1708d99d98e1d0e5b3b277f74b6a10f2f675387d)