Restore the initial state at the end of line.

This matters for stateful encodings like iso-2022-jp.