Add a `closed_at` attribute to issues

Description

It's currently a pain to know programmatically when an issue was closed: you have to find all the issue events, find the last closed event and fetch its created_at date.

Proposal

I think it would be simpler to have a new closed_at attribute on issues. The benefits would be as follows:

  • simpler to get an issue's closure datetime and expose this in the API
  • allows to sort by closed_at in the issues list
  • ease the analysis of issue triaging

Notes:

  • This could also be added to Issue::Metrics instead?
  • This could also be added for merge requests while we're at it.

Links / references

For reference, GitHub is doing that: https://developer.github.com/v3/issues/#get-a-single-issue