Qualifier Kurt Maflin produced a fantastic display to beat John Higgins at the World Snooker Championship.