Support on_exit for registering callbacks in ExUnit.

closes #2319