Misc fixes due to building on Mac OS X 10.6

fix: no  pyobject-building if configured without dynamic loading
chg: minor include reordering + forward declarations + cosmetics
fix: AM_COND_IF may be undefined in older automake/autoconf
fix: distribute ALL tested tests
fix: no double definition of NATNUMBER/int_number in structs.h
fix: n_ExtGcd is not always related to HAVE_RINGS