Updates to ActiveMapper contributed by Gabriel Jacobo.  The main purpose of the changes is to ensure that relationships are properly detected and built in the proper order.  This should fix some problems that people were having with ActiveMapper requiring classes to be declared in a specific order.
Updates to ActiveMapper contributed by Gabriel Jacobo.  The main purpose of the
changes is to ensure that relationships are properly detected and built in the
proper order.  This should fix some problems that people were having with
ActiveMapper requiring classes to be declared in a specific order.

wfxiang08/sqlalchemy,robin900/sqlalchemy,hsum/sqlalchemy,itkovian/sqlalchemy,elelianghh/sqlalchemy,graingert/sqlalchemy,davidfraser/sqlalchemy,j5int/sqlalchemy,inspirehep/sqlalchemy,Cito/sqlalchemy,dstufft/sqlalchemy,bootandy/sqlalchemy,Cito/sqlalchemy,ThiefMaster/sqlalchemy,EvaSDK/sqlalchemy,ThiefMaster/sqlalchemy,WinterNis/sqlalchemy,wfxiang08/sqlalchemy,alex/sqlalchemy,sandan/sqlalchemy,276361270/sqlalchemy,davidjb/sqlalchemy,hsum/sqlalchemy,robin900/sqlalchemy,davidfraser/sqlalchemy,bootandy/sqlalchemy,alex/sqlalchemy,epa/sqlalchemy,zzzeek/sqlalchemy,itkovian/sqlalchemy,bdupharm/sqlalchemy,epa/sqlalchemy,brianv0/sqlalchemy,monetate/sqlalchemy,davidjb/sqlalchemy,graingert/sqlalchemy,inspirehep/sqlalchemy,olemis/sqlalchemy,276361270/sqlalchemy,sandan/sqlalchemy,elelianghh/sqlalchemy,j5int/sqlalchemy,wujuguang/sqlalchemy,monetate/sqlalchemy,sqlalchemy/sqlalchemy,halfcrazy/sqlalchemy,Akrog/sqlalchemy,WinterNis/sqlalchemy,bdupharm/sqlalchemy,pdufour/sqlalchemy,wujuguang/sqlalchemy,brianv0/sqlalchemy,Cito/sqlalchemy,pdufour/sqlalchemy,halfcrazy/sqlalchemy,Akrog/sqlalchemy,EvaSDK/sqlalchemy,dstufft/sqlalchemy,olemis/sqlalchemy,alex/sqlalchemy