Cleanup decode_code_page_stateful() and encode_code_page()

 * Fix decode_code_page_errors() result
 * Inline decode_code_page() and encode_code_page_chunk()
 * Replace the PyUnicodeObject type by PyObject
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py
index ffd2d79..4901362 100644
--- a/Lib/test/test_codecs.py
+++ b/Lib/test/test_codecs.py
@@ -1980,6 +1980,9 @@
             ))
 
     def test_incremental(self):
+        decoded = codecs.code_page_decode(932, b'\x82', 'strict', False)
+        self.assertEqual(decoded, ('', 0))
+
         decoded = codecs.code_page_decode(932,
                                           b'\xe9\x80\xe9', 'strict',
                                           False)