Before this commit, the destroy method of a job-scoped
bean was not called after a test method.
This commit changes the listener to respect the
DisposableBean contract for job-scoped beans (and make it
consistent with the calls to the JobSynchronizationManager
in AbstractJob, ie calling register/release).
FTR, I did not find a clean way to test this with an
assertion (which should be made after the test method),
but a log message in the destroy method shows that the
method is now called as expected.
Resolves#1288
(cherry picked from commit ad50599d28)