debug: be more careful about removing the breakpoint.

Just because the process hit a signal or something doesn't
(necessarily) mean it's going to die.  Clean up our breakpoint as
soon as we know we can do so.
code reorg for 'mallocs'.

it was getting unwieldy.  now we have one synchronous function
that just returns an event, and we decide what to do based on the
the kind of event we just received.