Merge "Keep detailed job-ended reasons in the history ring" into pi-dev