COMPMID-1088: Use IMemoryRegion in interfaces where possible

-Simplifies import memory interface
-Changes the used of void** handles with appropriate interfaces.

Change-Id: I5918c855c11f46352058864623336b352162a4b7
diff --git a/arm_compute/runtime/IMemoryRegion.h b/arm_compute/runtime/IMemoryRegion.h
index 4c08b4a..aa8c07e 100644
--- a/arm_compute/runtime/IMemoryRegion.h
+++ b/arm_compute/runtime/IMemoryRegion.h
@@ -25,6 +25,7 @@
 #define __ARM_COMPUTE_RUNTIME_IMEMORY_REGION_H__
 
 #include <cstddef>
+#include <memory>
 
 namespace arm_compute
 {
@@ -36,12 +37,25 @@
      *
      * @param[in] size Region size
      */
-    IMemoryRegion(size_t size)
+    explicit IMemoryRegion(size_t size)
         : _size(size)
     {
     }
     /** Virtual Destructor */
     virtual ~IMemoryRegion() = default;
+    /** Extract a sub-region from the memory
+     *
+     * @warning Ownership is maintained by the parent memory,
+     *          while a wrapped raw memory region is returned by this function.
+     *          Thus parent memory should not be released before this.
+     *
+     *
+     * @param[in] offset Offset to the region
+     * @param[in] size   Size of the region
+     *
+     * @return A wrapped memory sub-region with no ownership of the underlying memory
+     */
+    virtual std::unique_ptr<IMemoryRegion> extract_subregion(size_t offset, size_t size) = 0;
     /** Returns the pointer to the allocated data.
      *
      * @return Pointer to the allocated data
@@ -52,16 +66,11 @@
      * @return Pointer to the allocated data
      */
     virtual void *buffer() const = 0;
-    /** Handle of internal memory
-     *
-     * @return Handle of memory
-     */
-    virtual void **handle() = 0;
     /** Memory region size accessor
      *
      * @return Memory region size
      */
-    size_t size()
+    size_t size() const
     {
         return _size;
     }