ugtrain: use list_for_each() everywhere

For this purpose it is required to use the config in the main()
function as pointer as well. So do it and introduce the alias
'vect_for_each()'.