Update change to invalidate cache after deletion of draft revision

When draft revision is deleted the change is updated only when the
current draft patch set was deleted. That's because new current patch
set field must be updated in the database.  However when non current draft
patch set was deleted no update of the change happen.  That breaks
CS2 as it relies on browser side cached ETag and computation of ETag on
the server side. Because nothing is changed, the ETags are the same and
HTTP status 304 is returned.

Update the change also if non current draft patch set was deleted.

The only alternative to this approach is to decouple draft revision
retrieval from /changes/<id>/detail endpoint.

Bug: issue 2405
Change-Id: I80f2331362ba61306c9436921ebf153b23c3c4bc
(cherry picked from commit a50fa6761f306aa774e34dd5dc356180743dcbbd)
1 file changed