Fix a goto jumping past va_end

Found by coverity
Move format_time_summary to its own file to fix linking issues
Merge branch 'master' of github.com:wesnoth/wesnoth-old