Added pinned memory functionality

* Moved alloc and pinned out of array class. Now use af::alloc or af::pinned.
* Fixed warning in cuda JIT for printf
Fixed potential memory leaks. Each array allocated with new [n] must be deallocated using delete [].
Merge pull request #229 from shehzan10/devel

Added pinned memory creation