Add report_stats_endpoint option to configure where stats are reported to, if enabled. Contributed by @Sorunome.