Huddersfield Town have appointed former Borussia Dortmund coach David Wagner as their new head coach.