Midfielder Adam Clayton ruined Wigan's defensive record with a late strike to help Huddersfield to a 1-0 win in an otherwise dour struggle.