Refactor optimization PushOutScanOutput
Correct bug in PushOutScanOutput unittests where optimization was not properly excluded
Add case to push out a sum-of-dot from Scan
Add unit tests for pushing out a sum-of-dot from Scan
Validate that dot_input.owner is not None
Restrict length of input seqs to a scan's grad-scan when truncate_gradient is defined on the original scan
Ensure scan optimizations are included in the compile mode when relevant
Make TestPushOutSumOfDot unit tests compatible with both float32 and 64
Ensure dot_input.owner is an Apply node
Fix bug in {inc,set}_subtensor in advanced1 case

Reported by Stanislas Lauly
Update inplace_increment1d_slow
Address comments following code review
Do not move some Subtensor to the GPU when this do not make sence.

When we do this on an inputs/shared var and that this is the only use
of it in the graph, we should only transfer to the GPU the small
computation.
Do not raise warning when the old code was working correctly.
test the non broadcast case
Test no broadcast on all dimensions
Merge pull request #4 from nouiz/lamblin-fix_inc_set_subtensor1

Remove useless warning and make the graph more optimized in old supported cases.
If we keep the Subtensor on the CPU, keep the bubble active

fix gh-2327
Do the same on the new gpu back-end
Ensure client is an apply node