Wild Oats XI has won the Sydney to Hobart yacht race in record time.