Merge to XFA: Add type cast definitions for CPDF_Array.

This Cl adds ToArray, CPDF_Object::AsArray and CPDF_Object::IsArray and
updates the src to use them as needed.

BUG=pdfium:201
R=thestig@chromium.org, tsepez@chromium.org

Review URL: https://codereview.chromium.org/1417893003 .

(cherry picked from commit c2bfc000e502c42c9a3017038fd9104c7997d126)

Review URL: https://codereview.chromium.org/1419643005 .
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index bd7741d..b3c8137 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -1041,14 +1041,15 @@
     pDestObj = nameTree.LookupValue(index, bsName);
   }
   if (!pDestObj)
-    return NULL;
+    return nullptr;
   if (CPDF_Dictionary* pDict = pDestObj->AsDictionary()) {
     pDestObj = pDict->GetArray(FX_BSTRC("D"));
     if (!pDestObj)
-      return NULL;
+      return nullptr;
   }
-  if (pDestObj->GetType() != PDFOBJ_ARRAY)
-    return NULL;
+  if (!pDestObj->IsArray())
+    return nullptr;
+
   CFX_WideString wsName = PDF_DecodeText(bsName);
   CFX_ByteString utf16Name = wsName.UTF16LE_Encode();
   unsigned int len = utf16Name.GetLength();