Clean up header includes

Fix error with GCC 11.2 on Linux due to missing fx_codec_def.h
(undefined FXCODEC_RESUNIT_METER and FXCODEC_RESUNIT_NONE). Then do
other header cleanups in the affected files.

Change-Id: I644284e6fe7e4065112f19a347a69a67ce816af9
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/84590
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/AUTHORS b/AUTHORS
index f37b91e..56b9e5f 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -23,6 +23,7 @@
 Michael Doppler <m.doppler@gmail.com>
 Miklos Vajna <vmiklos@vmiklos.hu>
 Minh Trần <myoki.crystal@gmail.com>
+Peter Varga <pvarga@inf.u-szeged.hu>
 Ralf Sippl <ralf.sippl@gmail.com>
 Robert Collyer <rcollyer99@gmail.com>
 Ryan Wiley <wileyrr@gmail.com>
diff --git a/core/fxcodec/png/png_decoder.cpp b/core/fxcodec/png/png_decoder.cpp
index 58cf818..ffdd7e7 100644
--- a/core/fxcodec/png/png_decoder.cpp
+++ b/core/fxcodec/png/png_decoder.cpp
@@ -6,15 +6,13 @@
 
 #include "core/fxcodec/png/png_decoder.h"
 
+#include <setjmp.h>
 #include <string.h>
 
-#include <algorithm>
-
 #include "core/fxcodec/cfx_codec_memory.h"
 #include "core/fxcodec/fx_codec.h"
+#include "core/fxcodec/fx_codec_def.h"
 #include "core/fxcrt/unowned_ptr.h"
-#include "core/fxge/dib/fx_dib.h"
-#include "third_party/base/compiler_specific.h"
 
 #ifdef USE_SYSTEM_LIBPNG
 #include <png.h>
diff --git a/core/fxge/text_char_pos.h b/core/fxge/text_char_pos.h
index ee4e670..b28d249 100644
--- a/core/fxge/text_char_pos.h
+++ b/core/fxge/text_char_pos.h
@@ -7,6 +7,7 @@
 #ifndef CORE_FXGE_TEXT_CHAR_POS_H_
 #define CORE_FXGE_TEXT_CHAR_POS_H_
 
+#include "build/build_config.h"
 #include "core/fxcrt/fx_coordinates.h"
 
 class TextCharPos {