Integer: use own arithmetic & relational methods
Integer: use own arithmetic & relational methods

It seems in order to be fast we need fast integers and rationals. I just
directly coded all arithmetic and relational (except __cmp__) methods in
Integer.

This gains a bit of speedup:

Timing
------

i = Integer(3)
j = Integer(4)
q = Rational(3,4)

     %timeit  %timeit  %timeit %timeit  %timeit  %timeit %timeit  %timeit
      i + 1    i + j    i + q   i * 4    i * j    i * q   i == 3   i == q

old: 122 µs  113 µs    114 µs  48.1 µs  44.3 µs  44.6 µs 77.2 µs  65.4 µs
new:  12.8µs  18.3µs   124 µs  12.9 µs  18.4 µs  55.1 µs  7.5 µs  76.0 µs


x = Symbol('x')
y = Symbol('y')

     %timeit  %timeit  %timeit
     x == i   x + i    x + y (for reference only)

old: 133 µs   28.6 µs   27 µs
new: 132 µs   28.4 µs   -//-


P.S. from the timings it can be seen that out Rational is *slow* -- we need to
do something about it.

moble/sympy,Mitchkoens/sympy,emon10005/sympy,cswiercz/sympy,yashsharan/sympy,ga7g08/sympy,Mitchkoens/sympy,liangjiaxing/sympy,aktech/sympy,ahhda/sympy,Sumith1896/sympy,ga7g08/sympy,souravsingh/sympy,abhiii5459/sympy,AkademieOlympia/sympy,atreyv/sympy,hrashk/sympy,wyom/sympy,debugger22/sympy,pbrady/sympy,shipci/sympy,shikil/sympy,kevalds51/sympy,yukoba/sympy,beni55/sympy,lidavidm/sympy,toolforger/sympy,liangjiaxing/sympy,souravsingh/sympy,beni55/sympy,postvakje/sympy,lindsayad/sympy,skidzo/sympy,jbaayen/sympy,beni55/sympy,Davidjohnwilson/sympy,Arafatk/sympy,grevutiu-gabriel/sympy,ga7g08/sympy,mafiya69/sympy,saurabhjn76/sympy,MechCoder/sympy,dqnykamp/sympy,pbrady/sympy,Davidjohnwilson/sympy,asm666/sympy,bukzor/sympy,debugger22/sympy,ChristinaZografou/sympy,AunShiLord/sympy,madan96/sympy,pandeyadarsh/sympy,farhaanbukhsh/sympy,kaichogami/sympy,Curious72/sympy,dqnykamp/sympy,kumarkrishna/sympy,MechCoder/sympy,mcdaniel67/sympy,MridulS/sympy,kmacinnis/sympy,hargup/sympy,minrk/sympy,jamesblunt/sympy,Gadal/sympy,mafiya69/sympy,Arafatk/sympy,maniteja123/sympy,shikil/sympy,jaimahajan1997/sympy,emon10005/sympy,Designist/sympy,saurabhjn76/sympy,jaimahajan1997/sympy,grevutiu-gabriel/sympy,bukzor/sympy,mafiya69/sympy,sahmed95/sympy,kmacinnis/sympy,MechCoder/sympy,souravsingh/sympy,pandeyadarsh/sympy,Curious72/sympy,Gadal/sympy,asm666/sympy,atsao72/sympy,Vishluck/sympy,drufat/sympy,postvakje/sympy,meghana1995/sympy,grevutiu-gabriel/sympy,mcdaniel67/sympy,abhiii5459/sympy,AunShiLord/sympy,Gadal/sympy,jamesblunt/sympy,kevalds51/sympy,iamutkarshtiwari/sympy,kumarkrishna/sympy,AunShiLord/sympy,toolforger/sympy,shipci/sympy,Shaswat27/sympy,AkademieOlympia/sympy,Titan-C/sympy,debugger22/sympy,tovrstra/sympy,kaushik94/sympy,ChristinaZografou/sympy,rahuldan/sympy,sunny94/temp,Designist/sympy,chaffra/sympy,oliverlee/sympy,Titan-C/sympy,Arafatk/sympy,kaushik94/sympy,emon10005/sympy,ahhda/sympy,lindsayad/sympy,Shaswat27/sympy,garvitr/sympy,cccfran/sympy,amitjamadagni/sympy,rahuldan/sympy,yukoba/sympy,hrashk/sympy,moble/sympy,fperez/sympy,aktech/sympy,oliverlee/sympy,kaushik94/sympy,jerli/sympy,Curious72/sympy,garvitr/sympy,VaibhavAgarwalVA/sympy,oliverlee/sympy,Mitchkoens/sympy,pernici/sympy,Titan-C/sympy,kaichogami/sympy,abloomston/sympy,Davidjohnwilson/sympy,atsao72/sympy,meghana1995/sympy,ahhda/sympy,Sumith1896/sympy,sahmed95/sympy,Vishluck/sympy,abloomston/sympy,toolforger/sympy,meghana1995/sympy,yashsharan/sympy,KevinGoodsell/sympy,diofant/diofant,wanglongqi/sympy,cccfran/sympy,sunny94/temp,lidavidm/sympy,lindsayad/sympy,skidzo/sympy,garvitr/sympy,mattpap/sympy-polys,atreyv/sympy,dqnykamp/sympy,sahilshekhawat/sympy,atsao72/sympy,wanglongqi/sympy,drufat/sympy,pbrady/sympy,madan96/sympy,hazelnusse/sympy-old,mcdaniel67/sympy,kevalds51/sympy,flacjacket/sympy,ChristinaZografou/sympy,vipulroxx/sympy,vipulroxx/sympy,Vishluck/sympy,jerli/sympy,farhaanbukhsh/sympy,sampadsaha5/sympy,Shaswat27/sympy,pandeyadarsh/sympy,saurabhjn76/sympy,sahilshekhawat/sympy,hrashk/sympy,jerli/sympy,jbbskinny/sympy,skirpichev/omg,drufat/sympy,yashsharan/sympy,abloomston/sympy,jbbskinny/sympy,vipulroxx/sympy,shipci/sympy,MridulS/sympy,hargup/sympy,maniteja123/sympy,bukzor/sympy,cccfran/sympy,shikil/sympy,wyom/sympy,yukoba/sympy,kaichogami/sympy,jaimahajan1997/sympy,kumarkrishna/sympy,srjoglekar246/sympy,AkademieOlympia/sympy,liangjiaxing/sympy,asm666/sympy,jamesblunt/sympy,skidzo/sympy,VaibhavAgarwalVA/sympy,lidavidm/sympy,sahilshekhawat/sympy,sahmed95/sympy,amitjamadagni/sympy,sampadsaha5/sympy,MridulS/sympy,minrk/sympy,Sumith1896/sympy,ryanGT/sympy,Designist/sympy,wanglongqi/sympy,madan96/sympy,cswiercz/sympy,sampadsaha5/sympy,rahuldan/sympy,wyom/sympy,iamutkarshtiwari/sympy,VaibhavAgarwalVA/sympy,chaffra/sympy,aktech/sympy,sunny94/temp,farhaanbukhsh/sympy,abhiii5459/sympy,moble/sympy,atreyv/sympy,iamutkarshtiwari/sympy,maniteja123/sympy,chaffra/sympy,postvakje/sympy,hazelnusse/sympy-old,kmacinnis/sympy,jbbskinny/sympy,cswiercz/sympy,hargup/sympy