Theano/Theano — pull request #2338 by abergeron (2014-12-13 17:20:00+00:00)
Title: Convert SetSubtensor to IncSubtensor when possible

This came up in a user case where decoupling led to code doing essentially this:

```
v =
s = v[[2, 1]]
g = s + 1
r = set_subtensor(s, g)
```

In this case the set_subtensor is actually an inc_subtensor in disguise.

I only cover the AdvancedSubtensor1 case in this PR as that was the problem, but this could be extended to the other kind of indexing.