rules: add timeline in rule detail

This patch adds a timeline in rule detail. It displays the number
of alerts generated by a rule over time. The graph contains
per-host series.