Apply SF patch #1698994: Add getstate() and setstate()
methods to incrementalcodecs.

Also forward port r54786 (fix the incremental
utf_8_sig decoder).
5 files changed