Judd Trump avoids following Ronnie O'Sullivan out of the World Championship by coming from behind to beat Thepchaiya Un-Nooh 10-9.