GTEST: reduce stack usage in tests
What?
This PR reduces stack memory usage by converting stack allocations to heap in various UCX tests.
Why?
Customers with limited stack sizes have recently experienced stack overflow issues when running UCX. The goal is to ensure that the entire UCX runs within a defined stack size threshold. By reducing the stack frame size in tests, this change helps in testing the runtime stack usage, ensuring that it starts within the threshold.
How?
This PR reduces stack usage by creating separate helper functions for excessive inline functions calls.
@Artemy-Mellanox @yosefe I added this: https://github.com/openucx/ucx/pull/10131/commits/420caff458f0e3b11fcdb2052c179980fc9d5fdf So we don't need https://github.com/openucx/ucx/pull/10131/commits/7d0114c3ce9a29e47484a6769551216253cac76f and https://github.com/openucx/ucx/pull/10131/commits/0e978f3f1cf17d06a34c0ebbc19c24dbe0b508a0 I can either add a commit to revert these commits or drop them and force push, please let me know what do you prefer. Additionally, please see the description of this PR, I added reproduction screenshots of the relevant changes.
@Artemy-Mellanox @yosefe I reverted https://github.com/openucx/ucx/commit/7d0114c3ce9a29e47484a6769551216253cac76f and https://github.com/openucx/ucx/commit/0e978f3f1cf17d06a34c0ebbc19c24dbe0b508a0, also reverted to static array. Please re-review :)