Synchronize with upstream, support Go-Back-N

Build with <<make GOBACKN=1>> to use the GOBACKN protocol.