Add index support for CudaTensor

This pull request adds index supports to CudaTensors and the code is based on the corresponding implementation of index for CPU Tensors.