fix(useId): prevent FinalizationRegistry entry leak in useId (#9853)
* fix(useId): avoid FinalizationRegistry entry leak in useId
* fix test in React 16/17
* add comments to test
* additional test: changing the id should unregister the old token and register the new one
---------
Co-authored-by: Robert Snow <rsnow@adobe.com>