Matej Vydra scored a hat-trick as Reading fought from two goals down to defeat 10-man Huddersfield Town and reach the FA Cup fourth round.