domainify: wrap _flush as well, clean up domain on stream end