Study of the electromagnetic Dalitz decays ψ(ϒ)→ηc(ηb)l+l−