Added CudaTensor.sign
Added copying form of CudaTensor.cmul

i.e.
	x:cmul(y,z)
Previously only
	x:cmul(y)
was implemented.
Added single-dimensional sum for CudaTensor

i.e. summation of the form y:sum(x,1). This is supported for up to
4-dimensional tensors in a single kernel call. More dimensions could be
added if needed by looping over this kernel.

Internally two generic reduction kernels are used which reduce either
the innermost or one of the outer dimensions. In either case global
memory accesses are fully coelesced.
Added single-dimensional min/max for CudaTensor
Added copying form of CudaTensor.pow
Added logical operators that return non-ByteTensors

The existing equality operators always return ByteTensors. Often the
return values from an equality operation needs to be used with a tensor
of the original type (e.g. point-wise multiplication with a mask), and
the ByteTensor therefore has to be cast back to this type. This casting
is unneccessary, and for CudaTensors would be costly, as it involves a
round-trip to the host.

This commit adds new forms of the equality operators that directly
writes the result into a tensor of the approriate type. For example

	x = torch.DoubleTensor(5)
	y = torch.rand(5)
	x:lt(y,0.5)

The existing ByteTensor-returning forms are still present.
Added new logical operators for CudaTensor
Replaced uint with unsigned

... as it otherwise does not build on all compilers.
Fixed operand order for CudaTensor logical operations
Single-dimensional CudaTensor reduction handles large tensors

Previously most dimensions were limited to 64k. Now there is no limit.
Improved performance of single-dimensional CudaTensor reduction

This uses a parallel reduction to speed up the case where the reduction
is over the innermost dimension. For a 2k x 2k matrix the speedup is
around 3x.

This approach means that the reduction is done using single-precision
rather than double-precision, as before.
Merge pull request #127 from akfidjeland/cuda

Cuda updates.