BZ870424: Added test for cleaning up DB after process was aborted

Added test case for listener cleaning up DB after process was aborted. Test case fails because there is one non-completed task in the test which the listener does not remove. Please review if it uses process API as desired.