L::Util: Add drain_pipe and replace some ad-hoc instances of it

Signed-off-by: Niels Thykier <niels@thykier.net>