Starc hat-trick, Smith fifty firm up NSW advantage