Merge pull request #1364 from delallea/minor

Minor fixes
correctly fix the test with numpy 1.7.1
Add theano.sandbox.cuda.unuse()
remove useless import that cause crash in the else clause.

Python was thinking that theano was a local variable!
Allow loop of call to cuda.use() and cuda.unuse().
Merge pull request #1366 from nouiz/unuse_gpu

Add theano.sandbox.cuda.unuse()
better comments
make make_node to cast and filter_variable inputs to scan
remove old comment (TODO was already implemented)
re-order in order to first do the checks before constructing this attributes
better comments
PEP8
safe_new should return a variable not a graph
test proposed by Oliver
fix PR

the unbroadcast(shape_padleft(x)) might not be of the same type as x,
specifically when x is CudaNdarrayTyepe,  unbroadcast(shape_padleft(x))
is a TensorType.
re-add change
fix scan optimization
Add Images2Neibs.perform method.
remove unused error.
a few pep8.