Quantum fields on closed timelike curves