Stochastic functional differential equations on manifolds