Better memory management

Delete the memory as soon as the thread is finished running or as soon as
the weight file was written.

See Issue #13915
Improve Cancelling

Now whenever the computation fails for one of the weights, all the other
computation stop and the error message is reported.

See Issue #13915
EXECUTABLE_ONLY for the CLIs

So far, the CLI where used as Shared object module. A shared object module
give the advantages of reducing the reading/writing of files since they
are directly passed through slicer's API. However, there is no progress
feedback and no way of cancelling such module.
(See http://www.na-mic.org/Bug/view.php?id=2965)
That's way we switch our CLIs to EXECUTABLE_ONLY so they can be cancelled
and give feedeback.

Note: In the case of pose body, we prefer perfomance over control, this is
why it stays a shared module object.

See Issue #13915
Merge branch '13915-ImproveArmatureWeightMulti-threading' into heat-diffusion

* 13915-ImproveArmatureWeightMulti-threading:
  EXECUTABLE_ONLY for the CLIs
  Improve Cancelling
  Better memory management