Usman Khawaja ended a 19-month-long drought for a triple-figure score and reinforced his place in Australia's red-ball setup.