[analyzer][Z3][NFCI] Simplify getExpr* functions by taking a RetTy reference (#180801)
Let me start by: This is some ancient code and was never really uphold
to the greatest quality standards.
It turns out the `RetTy` was almost always provided, and in the cases
when it wasn't, we could just pass a dummy and discard the result.
Probably the APIs could be refactored, but I decided not to. The code
mostly works, let's not stir up the mud.
Addresses
https://github.com/llvm/llvm-project/pull/168034#discussion_r2785236941