Refactor Arb `visit` functions

Refactor some of the `visit` functions according to comments from Fredrik Johansson, author of Arb.

* Minimize usage of temporary variables
* Clear temporary variables after they have been used.
We should rework this to avoid `1*x*y`, and do `x*y` directly. This could be done as a separate PR.