Image inpainting via variational approximation of a Dirichlet problem with free discontinuity