restore the initial state at the end of line.

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