Array: introduce get variant that returns also the Ref it is one

Similar to the new one in Dict
diff --git a/poppler/Array.cc b/poppler/Array.cc
index 83098a2..cc7dd0c 100644
--- a/poppler/Array.cc
+++ b/poppler/Array.cc
@@ -77,6 +77,20 @@
   return elems[i].fetch(xref, recursion);
 }
 
+Object Array::get(int i, Ref *returnRef, int recursion) const
+{
+  if (i < 0 || std::size_t(i) >= elems.size()) {
+    *returnRef = { 0, 0 };
+    return Object(objNull);
+  }
+  if (elems[i].getType() == objRef) {
+    *returnRef = elems[i].getRef();
+  } else {
+    *returnRef = { 0, 0 };
+  }
+  return elems[i].fetch(xref, recursion);
+}
+
 const Object &Array::getNF(int i) const {
   if (i < 0 || std::size_t(i) >= elems.size()) {
     static Object nullObj(objNull);
diff --git a/poppler/Array.h b/poppler/Array.h
index b64503a..1d03cbc 100644
--- a/poppler/Array.h
+++ b/poppler/Array.h
@@ -68,6 +68,7 @@
 
   // Accessors.
   Object get(int i, int recursion = 0) const;
+  Object get(int i, Ref *returnRef, int recursion = 0) const;
   const Object &getNF(int i) const;
   bool getString(int i, GooString *string) const;