ctest_submit: Generate Done.xml at submit time
This fixes a bug where calling ctest_submit()
would result in a Done.xml
file with an empty <buildId>
element.
CDash responds with a buildId when CTest submits a file. For this reason, Done.xml needs to generated after CTest has submitted some other file to CDash. This change also has the benefit of making Done.xml's timestamp as late as possible, giving us a more accurate record of how long the entire build took to complete.