Jack Miller took a sensational win in the wet at Assen in the re-started 12-lap race ahead of Marc Marquez and Scott Redding.