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.