[perl #122476] TODO test for isfoo() crash on Win32 with threads
[perl #122476] use a hash instead of a ptr_table

Perl will duplicate the hash on ithread creation, so this will be
thread-safe.