Correct writing of timestampes in write_test() for sql2subunit

This commit corrects an error in the output generation from
write_test. Previously the method would return the same timestamp
twice, which was incorrect. This was caused by adding the
timestamp to the write_status function before calling it, which
overwrote the previously set one. This is corrected by calling
write_status() prior to setting the test status and stop_timestamp.

Change-Id: I2288084c95d0beb7c74e0215daea67ff80c99cb2
Story: #2000023
Merge "Correct writing of timestampes in write_test() for sql2subunit"