Merged r10554:10595 from michaelld/am_swig_4 into trunk. Major overhaul of SWIG...