BUG: test using deleted variable, caused segfault

Change-Id: I68f6d05d9bec03ab3be6595d4029a4eca4519ed2
BUG: only call RemoveProcessObject once from the process object

Allowing the ProcessObject to call Command::RemoveProcessObject
multiple time didn't allow for the correct time for the Command to
delete itself.

Change-Id: Ic0492e50c65b1c6a4bb7ba5a8c82424fd91b7b94
Merge topic 'SIMPLEITK-453_AddEventCallbacks' into next

1a23b08f BUG: only call RemoveProcessObject once from the process object
5d3e995e BUG: test using deleted variable, caused segfault