Add experimental JavaScript retrieval APIs.

Add the following set of APIs to retrieve the JavaScript code from
actions in a document's name tree:

- FPDFDoc_GetJavaScriptActionCount()
- FPDFDoc_GetJavaScriptAction()
- FPDFDoc_CloseJavaScriptAction()
- FPDFJavaScriptAction_GetName()
- FPDFJavaScriptAction_GetScript()

This also adds the FPDF_JAVASCRIPT_ACTION type and
ScopedFPDFJavaScriptAction to help manage the lifetime of
FPDF_JAVASCRIPT_ACTION.

This is implemented on top of CPDF_Action, and improves validation in
CPDF_Action to better follow the spec.

Bug: pdfium:1253
Change-Id: I2b3ba83bb4f661e6c996c9d057fbf7d3a0c20e70
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/55750
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index bf20f6e..3ce1e08 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -120,6 +120,7 @@
     "public/fpdf_flatten.h",
     "public/fpdf_formfill.h",
     "public/fpdf_fwlevent.h",
+    "public/fpdf_javascript.h",
     "public/fpdf_ppo.h",
     "public/fpdf_progressive.h",
     "public/fpdf_save.h",