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
Merge pull request #315 from pbrunet/pattern_unordered

Pattern unordered