Total-variation-based methods for gravitational wave denoising