PERF: Added memory manager for CUDA backend
PERF: Added memory manager for CPU backend
Better error handling in ImageIO

* Handles errors better
* More verbose error messages
* Throws freeimage errors also
PERF Batching + Blocks images in rotate and transform

* Batching all images in single block set is slow at high blocks
* Divide batches of images into sets and launch blocks for that
Merge pull request #200 from shehzan10/imageio_fixes

Better error handling in ImageIO
Merge pull request #202 from shehzan10/devel

PERF Batching + Blocks images in rotate and transform
Fixed tests for imageio after error changes
Split sort_by_key instantiation into multiple files

* Compilation being killed due to timeout on tegra. Required splitting
Changed dir to isAscending in all sort functions
Merge pull request #205 from shehzan10/sort_fixes

Sort fixes
- sort_by_key split across two files
- dir changed to isAscending.
BUG: Fix in memory manager for CUDA backend with multiple devices
Changing new/delete to malloc/free for CPU backend
Adding variable names for MAX_BUFFERS and MAX_BYTES
Changing Array.data from cl::Buffer to cl::Buffer *
Fixing memory leak inside af_print_array
PERF: Added memory manager for OpenCL backend
Adding C api calls for malloc and free
Changing the error message for pinned memory alloc / free
Merge branch 'devel' into memory

Conflicts:
	src/backend/opencl/kernel/rotate.hpp
	src/backend/opencl/kernel/transform.hpp
Merge pull request #207 from pavanky/memory

Memory management for all three backends