Merge pull request #1570 from nouiz/flops

Flops
Add profiling detail for the MergeOptimizer
Fix comment.
make opt faster by using in2out instead of equilibrium.
pep8
Faster fgraph change during opt.

This make Merge Optimzer take 21s instead of 35s in one case.

I think this work correctly in case of revert.
Make a cache for TensorConstant.

This lower memory usage and speed up optimization by asking for less merge.
Add profilingof TopoOptimizer (reused by in2out, out2in)