Enable pytest-shard for functorch (#85321)
This extends https://github.com/pytorch/pytorch/pull/84961 to support functorch tests with pytest-shard.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/85321
Approved by: https://github.com/samdow, https://github.com/clee2000