Merge both legends' functionalities.

Right now this PR is extending only `HorizontalLegend` to cover `Legend` functionality. 

`Legend` class gonna be removed and `HorizontalLegend -> Legend`.

Close #1068.
d3.select always returns a selection, possibly a null selection but still a selection