Make CommandRelay multithreaded and have RPC responses from devices timeout.