Ronnie O'Sullivan won the Welsh Open in sensational fashion, making a maximum break in the final frame to complete a 9-3 win over Ding Junhui.