pep8
In the ShapeFeature, convert x.shape[1] to Shape_i. This will help compare shapes.
Add ShapeFeature.same_shape, that try to compare 2 var shapes.
Add local_useless_inc_subtensor.

Remove the IncSubtensor when we can infer all the shapes are the same.
Make opt local_useless_subtensor convert to subsample when we reverse.
Disable opt in some case discovered in new tests crash with the new opt.
Make optimization more deterministic
[CRASH] fix crash on the GPU with {inc,set}_subtensor and broadcasting the value
Fix GpuAdvSub1 verbose and error message.
[CRASH] Make GpuAdvancedSubtensor1 work with an empty list of indices.

fix gh-2065
Completed TODO in as_tensor_variable which said to strip off leading broadcastable dimensions.
Added check to make sure the variable is of the user specified size after removing leading broadcastable dimensions.
Completed TODO in tensor.py:as_tensor_variable which said to use the Apply default output mechanism.
Added tests to excited the various possible failure scenarios.
Merge pull request #2075 from nouiz/gpu_inc_sub_crash

[CRASH] fix crash on the GPU with {inc,set}_subtensor and broadcasting t...
Incorporated review comments.
Make OrderedSet pickable
(so fix tests broken by the previous commit that use them more frequently)
Add comment
Fix pycuda test in FAST_COMPILE
[TEST] fix test in buildbot
[TESTS] fix tests in FAST_COMPILE mode.