gh-36046: Fix sqrt(sqrt(2)) memory leak in ginac numeric.cpp
Fix the memory leak when computing the outer sqrt in `sqrt(sqrt(2))`, as
reported on sage devel at https://groups.google.com/g/sage-
devel/c/6zpxQKXtJgk
The unit test is a WIP and depends on
https://github.com/tekknolagi/valgrind/pull/1
- Resolves #33074
URL: https://github.com/sagemath/sage/pull/36046
Reported by: Volker Braun
Reviewer(s): Matthias Köppe