This partially reverts commit 4d4b189cce3af9328861038b7dae954744e4cef2.
The changes to main code are no longer needed as Framework's test
context framework no longer defines a DynamicPropertyRegistry bean. The
changes to test code have been kept to verify that @SpringBootTest and
TestcontainersPropertySourceAutoConfiguration continue to work in
combination.
Closes gh-42275