Rewrite chart functions to share data transformations, add unit tests

1) Unified the data models for the 3 different types of charts.
2) Separated out data transformation functions.
3) Added QUnit tests for the data transformation functions.
4) Added static HTML pages as integration tests for the chart functions.
5) Added grouped bars to horizontal bar chart.