ugtrain: fix and enhance config output

It would be good to see dynamic wish values, pointers to pointer
memory and pointer memory config entries correctly. So unify the
output code and enhance it.

When printing 0x0 as (void *), then 0 is printed. So cast it to
(long) and prefix it with "0x" to show that this is an offset or
an address.