Move the prefetchable caching decorator out of codecache.py into
torch/utils/_functools.py as prefetchable_cache, alongside the existing
cache_method utility. Uses a shared ThreadPoolExecutor with 2 workers
for all prefetch calls, avoiding per-call executor creation. The
decorator is re-exported as torch_key_cache in codecache.py for backward
compatibility with existing callers.
Authored with Claude.
Pull Request resolved: #182294
Approved by: https://github.com/zou3519
ghstack dependencies: #182187, #182188