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.
While we are at it, we should rework this to avoid `0 + x + y`, and do `x + y` directly.