Early Stopping for Nonparametric Testing