[FSDP] Add the unittests for the _replace_by_prefix (#73530)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73530
Improve the unittests for the utility functions
ghstack-source-id: 150340208
Test Plan: CI
Reviewed By: zhaojuanmao
Differential Revision: D34529335
fbshipit-source-id: 4e7283a58850d4674d22fb038284d6c762729dd4
(cherry picked from commit e53b0fd9d224578a89806408b71e145b967d602a)