Replaced the custom_stats class by two classes custom_stats_counter and custom_stats_timer.
This obviates the use of a hash map. Unfortunately there is no longer a print_all() method.