Existence and uniqueness of solutions to stochastic functional differential equations in infinite dimensions