France's Lucas Pouille claimed the biggest win of his career as he beat two-time champion Rafael Nadal in a sensational US Open last-16 match.