Fix for test of exp2 inplace on an int.

It was failing on a windows machine.
merge identical inputs as well (seqs and non-seqs)
reuse functionality for outputs
new optimization
fix to optimization to deal with identical nit sot of different lengths
new optimization
re-order optimizations
fix function (look at type for dtype)
fix a few tests
two new tests

Conflicts:
	theano/scan_module/tests/test_scan.py
removed wip code
no need for the if/else
more info
catch the right exception
check if shape feature is available + comments
more details when the optimization applies
no need for using the shape feature here
PEP8
typos
Correctly returns OpenMP status in case of error