Add slightly more detailed legend for the event graph.
Add slightly more detailed legend for the event graph.

- Supply colors from outside Dygraph to ensure they are available before
data is loaded and that they are same in the legend view.
- Add active state for graph type buttons.

jlaunonen/kirppu,jlaunonen/kirppu,jlaunonen/kirppu,jlaunonen/kirppu