ugtrain: restructure source code

Functionality is still the same.

Changes:
parser.cpp -> cfgparser.cpp
parser.h -> cfgparser.h
move functions to new file common.cpp
move functions to new file fifoparser.cpp
move functions to new file discovery.cpp
add new includes: common.h, fifoparser.h, discovery.h
move types and macros from cfgentry.h to common.h
cfgparser.cpp: remove an unused variable