nghttpx: Reset both timeouts when either read or write succeeds

Previously read and write timeouts work independently.  When we are
writing response to the client, read timeout still ticks (e.g., HTTP/2
or tunneled HTTPS connection).  So read timeout may occur during long
download.  This commit fixes this issue.  This commit only fixes the
upstream part.  We need similar fix for the downstream.
nghttpx: Reset timeouts when either read or write succeeds

See previous commit message why we need this.
nghttpx: Reduce epoll_ctl call
tests: Fix compiler warning