Guarantees of total variation minimization for signal recovery