ugtrain: introduce output_mem_val(), fix float printing

We ensure that old float values are displayed correctly in HEX.
This is how they are stored in memory and (if dumped) on disk.
This gives us a lot more flexibility and less confusion.