Introduces a dedicated `HTMLReportGenerator` class in `report_generator.py` to handle all aspects of HTML and chart rendering. This decouples the report presentation logic from the data collection process within `StatisticOutputTask`.
Key changes include:
- Migrated all HTML and JavaScript generation into the new `HTMLReportGenerator`.
- Extracted all statistic key constants into a separate `statistic_keys.py` file for improved organization.
- Renamed `_generate_chart_data` to `_collect_chart_data` to better reflect its purpose.
- Improved data handling robustness by using `.get()` for dictionary access and safely handling database query results.