Jordan Thompson wins first ATP Tour title with 'miracle' win over Ruud