PP-1287: do not purge moved job from history before the job is finished

With the server attribute job_history_enable = True, a job in the state M is purged after the job is really finished.

There are two conditions that need to be met in order to purge the job in the state M:

  1. The job in the state M is finished on the target server.
  2. The job in the state M is in the system at least <job_history_duration>.

The job in state M is still not stored with job_history_enable = False.