Added support for CUDA arrays in function space._cast().

space._cast(batch, dtype) no longer throws an exception when given a numeric or symbolic CudaNdArray. Instead, it returns the batch as-is (no-op) if dtype==theano.config.floatX, and raises a TypeError otherwise.