tests: New m4 macro ON_EXIT to add a cleanup action.
Several of the tests start daemons and then need to make sure that the
daemons get killed when the test completes, even if it completes in the
middle due to an early failure. Until now, they have been using manual
shell "trap" calls to do this. This works well enough for simple cases,
but sometimes multiple macros start daemons in a single test, and then
each "trap" has to be carefully written to kill off the daemons for the
previously invoked macros.
This commit introduces a new macro ON_EXIT whose use is composable: each
call appends a new action to the ones already specified.
Signed-off-by: Ben Pfaff <blp@nicira.com>