Initial version of optimization
Removed debug prints
Fix failing tests
Removed useless copies in unittest
Remove unused code
Support case where vector input is already an output of scan
Add tests and modify the optimization to cover new cases
Bug fix
Updated comments and fixed typos
Replace two transpose by a single one
Fixed tests failing in DebugMode
Merge pull request #2248 from carriepl/scan_push_out_dot

Scan opt to push out Dot products outside of Scan's inner graph