World number one Barty caps year by getting engaged