Dev work for ut-cunit-framework as well as establishing a common set of
functions between it and cppunit. A smattering of other fixes and
testing stuff.