Track both the start and end time of a deployment
As discussed in https://gitlab.com/gitlab-org/gitlab-ce/issues/40609#note_50529332, we were previously considering deployments to be instantaneous once they were considered "finished".
This is a bit naive, as of course deployments take time to fully roll out, especially in production environments.
To better handle this, we should detect both the start time and the end time of the deployment job. The start time is currently not easily available, and we should fix that.
Presently the end time is tracked in the database, and we should simply add the start time there as well for other usage. (See above)
Proposal
Add a new column in the DB to track the start time for any CI/CD job, similar to the end time we already have. This will be filled only for new jobs, old ones will have an empty value.