Streamline the idaevent test code (remove duplication). Add some extra debug code (cf figure at base of page http://ascend4.org/IDA).