Refactor last events

Consolidate last_event and last_failed_events on the overview page.
This reduces the template code and moves some business logic from
templates to the view.

Change-Id: I047e7b4453f340bb2666539dd28b5b5a55926adc
Merge "Refactor last events"