publish "device_failed_command" events in all relevant orchestration when children fail to complete cmd

plus other adjustments and code re-organization