[PipeSleepStrategy] use C++ smart ptrs instead of manual memory management
Compare changes
The destructor of PipeSleepStrategy caused segmentation faults when running optimized. Because the stats pointer is not initialized it was possibly to pass a garbage pointer to delete. Now we use a well defined C++ smart pointer which fixes the problem and is more idiomatic anyway.