IVGCVSW-863 Move clamp, for_each, foldl to misc/utility.h

Also, improve for_each, foldl, and related changes.

Change-Id: I0cf0c7dbf88f26bb70cc734ba9fb5725d405585f
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/114014
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Tested-by: Jenkins <bsgcomp@arm.com>
diff --git a/arm_compute/graph/nodes/BranchLayer.h b/arm_compute/graph/nodes/BranchLayer.h
index dd05315..5e4a8d9 100644
--- a/arm_compute/graph/nodes/BranchLayer.h
+++ b/arm_compute/graph/nodes/BranchLayer.h
@@ -31,7 +31,7 @@
 #include "arm_compute/graph/SubTensor.h"
 #include "arm_compute/graph/Types.h"
 
-#include "arm_compute/core/Helpers.h"
+#include "arm_compute/core/utils/misc/utility.h"
 
 #include <vector>
 
@@ -58,7 +58,7 @@
         _sub_graphs.push_back(arm_compute::support::cpp14::make_unique<SubGraph>(std::move(sub_graph1)));
         _sub_graphs.push_back(arm_compute::support::cpp14::make_unique<SubGraph>(std::move(sub_graph2)));
 
-        for_each([&](SubGraph & sub_graph)
+        utility::for_each([&](SubGraph && sub_graph)
         {
             _sub_graphs.push_back(arm_compute::support::cpp14::make_unique<SubGraph>(std::move(sub_graph)));
         },