BUG: Fixed memory leak in C++ API when doing indexing
SubArrays now contain reference to shared_ptr instead of parent
Merge branch 'memory' of github.com:pavanky/arrayfire into devel
Fixed references to shared_ptr for cpu and opencl backend