John Higgins came through a final-frame decider with Judd Trump to book a Welsh Open quarter-final against Ronnie O'Sullivan.