TempFSFile: Use a WeakMap for reference tracking if available
Use a WeakMap to track references to TempFSFile instances if available
to avoid deprecation warnings for dynamic property creation on PHP 8.2.
Use an anonymous class rather than an stdClass to test the behavior in
TempFSFileTestTrait to verify that bind() does not trigger dynamic
property creation on PHP 8.2.
Also add a Phan stub for WeakMap for PHP 7.4.
Bug: T324894
Change-Id: Ic413c115e9ed1c750e175152094f3309628e777a
(cherry picked from commit 4e3c6cb25db4423dcc093f63dcbe04d45d8781bb)