WIP Remove d3 dependency

Part of #1510 but I could do with some help from someone that knows how the original code was supposed to work.

- [x] Remove `_colorize`.
- [ ] Rework `@html` template to use just html.
So for some reason here, there are always more tab elements created from `stopData` than there are items in `@bucket` so nearly everyone of these iterators either returns the wrong value or just short circuits.