Created by: mtrofin
We clear the stats when calling dr_app_stop_and_cleanup. This means that a client wishing to consume stats programmatically could at most try and get them right before detach, which may miss data.
We introduce dr_app_stop_and_cleanup_with_stats for this purpose.