[BE][Functorch] Use nested namespace (#103685)
As we are a C++17 project now
Also, replace `enum` with `enum class` to make enum values visibility limited to the namespace.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/103685
Approved by: https://github.com/zou3519