Online Data Collection for Efficient Semiparametric Inference