Spent-time fix logic corner case

Force one last calculation before it saves, to cover the case when
the activity closes without switching to another activity. In this
case, the spent time was never calculated.

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>