Fixes TestShell initialization issues caused by resolving symlinks and looking for config.ini in the source path instead of the build path after migration to CMake (see #31131 (comment))
https://github.com/bitcoin/bitcoin/blob/ebe4cac38bf6c510b00b8e080acab079c54016d6/test/functional/test_framework/test_shell.py#L77 also fixes #31131
How to test:
$ python3
>>> import sys
>>> sys.path.insert(0, "./path/to/bitcoin/build/test/functional")
>>> from test_framework.test_shell import TestShell
>>> TestShell().setup(num_nodes=2, setup_clean_chain=True)
>>> TestShell().shutdown()
>>> TestShell.reset()