O'Connor retires from rugby