Det tidligere Manchester United-talent Paddy McNair har skrevet en ny kontrakt med Championship-mandskabet Middlesbrough.