[SegFormer, BEiT] Clean up tests
# What does this PR do?

BEiT and SegFormer still had some code that I had to remove, as semantic segmentation models are now created in the `_prepare_for_class` method in `test_modeling_common.py` (which was added in #15991).
_The documentation is not available anymore as the PR was closed or merged._