BaseActor tweaked so that writeToUsers is safe for a completed command
(as long as msgCode is not a "done" code). This involved adding msgCode to BaseActor.getUserCmdID
and a new class method to BaseCmd: stateFromMsgCode.
BaseActor.writeToOneUser: added a diagnostic print statement to help debug calling it with userID=0.