cmd/api: handle contexts re-converging

Fixes issue 4303

R=golang-dev, adg
CC=golang-dev
http://codereview.appspot.com/6816058
misc/dashboard/builder: check http status before processing response

Occasionally GAE will return a 500 error response, don't treat this as a valid JSON body.

R=adg, dsymonds
CC=golang-dev
http://codereview.appspot.com/6775066
cmd/ld: handle weak symbols
compiler_rt introduces a weak and hidden symbol compilerrt_abort_impl
into our pre-linked _all.o object, we have to handle it.

Fixes issue 4273.

R=iant, rsc, r
CC=golang-dev
http://codereview.appspot.com/6783050
exp/gotype: add more test packages

R=r
CC=golang-dev
http://codereview.appspot.com/6822051
archive/zip: handle corrupt extra data records

Fixes issue 4302.

R=golang-dev, bradfitz, adg
CC=golang-dev
http://codereview.appspot.com/6811048
go/printer, gofmt: trim trailing whitespace in comments

Also: updated go fix testcases to pass tests.

Fixes issue 4310.

R=r
CC=golang-dev
http://codereview.appspot.com/6810055
gofmt: apply gofmt -w src misc

Remove trailing whitespace in comments.
No other changes.

R=r
CC=golang-dev
http://codereview.appspot.com/6815053
reflect: improve documentation for DeepEqual regarding maps
Keys use ==; values use deep equality. Also remove the word 'member'.
Fixes issue 4258.

R=golang-dev, rsc
CC=golang-dev
http://codereview.appspot.com/6812055
net: use read deadline in Accept on windows

Fixes issue 4296.

R=golang-dev, alex.brainman
CC=golang-dev
http://codereview.appspot.com/6815044

Committer: Alex Brainman <alex.brainman@gmail.com>
image/jpeg: don't call ensureNBits unless we have to.

benchmark                     old ns/op    new ns/op    delta
BenchmarkDecodeBaseline         3155638      2783998  -11.78%
BenchmarkDecodeProgressive      4008088      3660310   -8.68%

R=r, bradfitz
CC=golang-dev
http://codereview.appspot.com/6775072
net: fix connection resets when closed on windows

It is common to close network connection while another goroutine is
blocked reading on another goroutine. This sequence corresponds to
windows calls to WSARecv to start io, followed by GetQueuedCompletionStatus
that blocks until io completes, and, finally, closesocket called from
another thread. We were expecting that closesocket would unblock
GetQueuedCompletionStatus, and it does, but not always
(http://code.google.com/p/go/issues/detail?id=4170#c5). Also that sequence
results in connection is being reset.

This CL inserts CancelIo between GetQueuedCompletionStatus and closesocket,
and waits for both WSARecv and GetQueuedCompletionStatus to complete before
proceeding to closesocket.  This seems to fix both connection resets and
issue 4170. It also makes windows code behave similar to unix version.

Unfortunately, CancelIo needs to be called on the same thread as WSARecv.
So we have to employ strategy we use for connections with deadlines to
every connection now. It means, there are 2 unavoidable thread switches
for every io. Some newer versions of windows have new CancelIoEx api that
doesn't have these drawbacks, and this CL uses this capability when available.
As time goes by, we should have less of CancelIo and more of CancelIoEx
systems. Computers with CancelIoEx are also not affected by issue 4195 anymore.

Fixes issue 3710
Fixes issue 3746
Fixes issue 4170
Partial fix for issue 4195

R=golang-dev, mikioh.mikioh, bradfitz, rsc
CC=golang-dev
http://codereview.appspot.com/6604072
A+C: add Peter Waller (individual CLA)

R=golang-dev, dsymonds
CC=golang-dev
http://codereview.appspot.com/6775083
syscall/exec_linux: enable changing controlling tty

As discussed in the following thread:
https://groups.google.com/forum/?fromgroups=#!topic/golang-dev/emeJffxWhVo

This is required to enable applications such as `less` to use something
other than stdin as the controlling terminal.

R=dave, iant
CC=bradfitz, golang-dev
http://codereview.appspot.com/6785057

Committer: Ian Lance Taylor <iant@golang.org>
test: match gccgo error messages for bug358.go

I fixed a bug in gccgo that was causing it to only give an
error for the first package that was imported and not used.

R=golang-dev, r
CC=golang-dev
http://codereview.appspot.com/6813058