coap.cgi: reduced subshells, use timeouts