Explicitly flush cout in MessageSvc::finalize()
After switching to python3 in Athena, we started to see intermittent garbled output coming from MessageSvc::finalize() and from terminate() of the AppMgr. Apparently the output flushing somehow behaves differently in the print function of python3 vs python2, that's why the problem had not been spotted before. Explicit flushing of cout inside MessageSvc::finalize() is expected to fix this problem.