ugtrain: move the config output to new files

src/cfgoutput.cpp
src/cfgoutput.h

Functionality is exactly the same.