Added dim checks for binary element wise ops
BUGFIX Fix segfault in copy array
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
Merge pull request #252 from shehzan10/devel

Bug fixes in indexing, copy and JIT