[Functorch] Skip docs setup if called in optimize mode (#100750)
Test plan: `python3 -OO -c "import torch._functorch.deprecated"`
Fixes https://github.com/pytorch/pytorch/issues/100680
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100750
Approved by: https://github.com/albanD