Merge mainline changes needed for hairlines & super-annotations

These changes will allow the super-annotations and hairlines plugins to be merged.

See http://dygraphs.com/hairlines/tests/hairlines.html for a demo and https://docs.google.com/document/d/1OHNE8BNNmMtFlRQ969DACIYIJ9VVJ7w3dSPRJDEeIew/edit# for documentation.

Summary of changes:
- Allow plugin instances to be passed in via the "plugins" option, not just classes. This is a convenient way to allow customization of the plugin for a particular dygraph.
- Adds a few more plugin events: dataWillUpdate, dataDidUpdate, pointClick, click, dblclick
- Export the tremendously useful legend.generateLegendHTML()
Yeah, iOS conventions.