Nick Kyrgios is through to the quarter-finals of Wimbledon after a five set victory over Brandon Nakashima.