Reduce latency in network processing

Backport from https://github.com/bitcoin/bitcoin/pull/3180