Continuum solvation model for infinite periodic systems