Optimize Host <-> Cuda memory transfers
Pinned memory is memory allocated on the host using the **cudaMallocHost** function, which prevents the memory from being swapped out and provides improved transfer speeds between Host and the actual Cuda device via DMA (Direct Memory Access).
It also allows non-blocking host<->GPU memcpy w.r.t. both host and GPU computations.

[Link](https://forum.nim-lang.org/t/3158) to topic on Nim forum.

It doesn't seem possible to use a custom allocator with `new` or `newSeq`

With Nim's memory region, it is possible to clearly distinguish Pinned Memory from normal memory, with somethin similar to
```Nim
type
  UncheckedArray {.unchecked.}[T] = array[0..100_000_000, T]
  PinnedArray[T] = object
    len: int
    data: ptr UncheckedArray[T]
  Cuda = object

var foo: Cuda ptr PinnedArray[int]
foo = cast[ptr[Cuda, PinnedArray[int]]](alloc sizeOf(PinnedArray[int]))
foo.data = cast[ptr UncheckedArray[int]](alloc 50_000)
foo.len = 50_000

foo.data[][2]=7
echo foo.data[][2]
```

Unfortunately `seq` do not support memory region yet which means implementing manual memory management for those pinned tensors.

### Where to use
If `seq` cannot be used with `cudaHostAlloc` (i.e. manual memory management is needed), a `PinnedTensor` type different from the base `Tensor` will be needed.
In that case, it is probably best not to expose it, and implement only a subset needed to load tensors/images/videos/audio files from disk and do data_augmentation.


### Warning: Benchmark needed

- [Optimistic Nvidia benchmark](https://devblogs.nvidia.com/parallelforall/how-optimize-data-transfers-cuda-cc/) 
- [Pessimistic Virginia U benchmarks](https://www.cs.virginia.edu/~mwb7w/cuda_support/pinned_tradeoff.html)
- [No change - PyTorch bench](https://discuss.pytorch.org/t/pinned-memory-cant-provide-any-speedup/4844/2)
- [Mem alloc overhead](https://www.cs.virginia.edu/~mwb7w/cuda_support/memory_management_overhead.html)
- [Mem transfer overhead](https://www.cs.virginia.edu/~mwb7w/cuda_support/memory_transfer_overhead.html)
 - [Another bench on NVS 5200M and K20c with script](https://gist.github.com/fasiha/b4c9bfbb919ffd95bdf6)