Remove function only removed instructions from the local machine, and
was therefore not MP safe.
Clone function failed to work correctly for non-trivial cases,
and sometimes caused an array out of bounds assertion.
These are replaced by a new commandproc which does each operation
as a single action, which is therefore MP safe.
Remove an unused struct field.
Fix RemoveProgramDependencies using one parameter for both source
and target, and rename the parameters to something sensible.
Update program window when invalidating in RemoveProgramDependencies.
Make SignalStateCondition::IsSignalValid const and add CheckSignalValid
for non-const validaty checking.
This is to avoid triggering an assertion, particularly
when clearing the program state in InitializeGame(), as the map has
just been reset, or when deleting a signal referenced by a condition.