Function: use new Array::get function

Makes code simple and saves getting twice if it's a ref
diff --git a/poppler/Function.cc b/poppler/Function.cc
index e0af1d1..873c2c0 100644
--- a/poppler/Function.cc
+++ b/poppler/Function.cc
@@ -690,12 +690,11 @@
   }
   for (i = 0; i < k; ++i) {
     std::set<int> usedParentsAux = *usedParents;
-    Object obj2 = obj1.arrayGetNF(i).copy();
-    if (obj2.isRef()) {
-      const Ref ref = obj2.getRef();
+    Ref ref;
+    Object obj2 = obj1.getArray()->get(i, &ref);
+    if (ref.num != 0) {
       if (usedParentsAux.find(ref.num) == usedParentsAux.end()) {
         usedParentsAux.insert(ref.num);
-        obj2 = obj1.arrayGet(i);
       } else {
         return;
       }