Part of #3941
The basic idea is to write integration tests that run sql statements with a memory limit enabled and verify that a runtime error is produced (rather than memory being exceeded).
This test can also serve as an example of how to configure DataFusion in this way