Efficient estimation of general dynamic models with a continuum of moment conditions