fix depth opt arg in totensor

toTensor has a bug.  The optional ```depth``` parameter is hard coded as ```narg=2```, which is actually the slot for the destination tensor.  ```narg=1``` is the ```QImage``` instance, ```narg=2``` is ```Tdst``` (tensor), ```narg=3``` is scale so ```narg=4``` should be the optional depth parameter.

I also added depth to the ```toTensor``` lua function if people (like myself) want to use it.