Instance-Optimal Uniformity Testing and Tracking