Ash Barty played the "perfect game" to end Australia's 46-year French Open drought and claim her maiden grand slam title just three years after her career was on the brink.