Unfold range as loop parameter if unrolling failed

Otherwise we end up with very long literals where a simple for loop is
much more efficient.
Pattern transformer rewritting

* Same behavior but it will be easy to have specific behavior for a new
  ast Node
Add specialized square function for gmp
 Better matching for Dict
Better matching for set
Fix documentation
Repeat optimisation until nothing change.