encoding/gob: save a call to userType
Avoid some pressure on the global mutex by lifting the call to userType
out of the closure.
TOTH to Matt Harden.

LGTM=crawshaw, ruiu
R=golang-codereviews, crawshaw, ruiu
CC=golang-codereviews
https://codereview.appspot.com/117520043
net: consolidate sockaddrToAddr functions

This CL removes sockaddrToAddr functions from socket creation
operations to avoid the bug like issue 7183.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/105100046
archive/zip: accept bogus trailing zeros in extras

Popular tools both add incorrect trailing zeroes to the zip
extras, and popular tools accept trailing zeros. We seemed to
be the only ones being strict here. Stop being strict. :(

Fixes Issue 8186

LGTM=ruiu, adg, dave
R=adg, ruiu, dave
CC=frohrweck, golang-codereviews
https://codereview.appspot.com/117550044
test: add test for function type in function literal

The gccgo compiler used to fail this test.  This was the root
cause of http://gcc.gnu.org/PR61308 .  The fix for the gccgo
compiler is http://codereview.appspot.com/122020043 .

LGTM=dave, bradfitz
R=golang-codereviews, dave, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/121200043
runtime: only use a single variable in USED

The gccgo version of USED only accepts a single variable, so
this simplifies merging.

LGTM=minux, dave
R=golang-codereviews, minux, dave
CC=golang-codereviews
https://codereview.appspot.com/115630043
runtime: remove unused enum maxround

LGTM=minux, dave
R=golang-codereviews, minux, dave
CC=golang-codereviews
https://codereview.appspot.com/122030043
syscall: fix typo in comment

LGTM=dave
R=golang-codereviews, dave
CC=golang-codereviews
https://codereview.appspot.com/120570043
runtime: use memmove rather than memcopy in mgc0.c

For consistency with other code, as that was the only use of
memcopy outside of alg.goc.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/122030044
runtime: remove outdated comment

LGTM=bradfitz, khr
R=khr, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/120400043
runtime/race: add tests for maps with big keys/vals
With the recent GC changes large objects are handled somewhat differently.

LGTM=khr
R=khr
CC=golang-codereviews
https://codereview.appspot.com/114600043
A+C: Percy Wegmann (individual CLA)

Generated by a+c.

R=gobot
CC=golang-codereviews
https://codereview.appspot.com/121240043
spec: comma-ok expressions return untyped boolean 2nd result

Technically a language change, this cleanup is a completely
backward compatible change that brings the boolean results
of comma-ok expressions in line with the boolean results of
comparisons: they are now all untyped booleans.

The implementation effort should be minimal (less than a
handfull lines of code, depending how well factored the
implementation of comma-ok expressions is).

Fixes issue 8189.

LGTM=iant, r, rsc
R=r, rsc, iant, ken
CC=golang-codereviews
https://codereview.appspot.com/112320045
runtime: remove type.go
We have an autogenerated version in zruntime_defs.
I am not sure what are the consequences as gdb never printed any values for me.
But it looks unnecessary to manually duplicate it.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews, iant, khr
https://codereview.appspot.com/115660043
crypto/tls: add ALPN support.

Fixes issue 6736.

LGTM=mikioh.mikioh
R=bradfitz, mikioh.mikioh
CC=golang-codereviews
https://codereview.appspot.com/108710046
undo CL 95760043 / b2131d729e52

Breaks Camlistore by introducing a datarace. See comments on
https://codereview.appspot.com/95760043/ for details.

I'll add a new test to lock-in the current behavior in a
subsequent CL.

I don't think Camlistore is particularly unique here: it's doing
the obvious thing to stream a multipart body to a server
using a goroutine feeding the multipart writer.

««« original CL description
mime/multipart: delay reading random source

If a user sets his/her own boundary string with SetBoundary,
we don't need to call randomBoundary at all.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/95760043
»»»

LGTM=ruiu
R=ruiu
CC=golang-codereviews, mathieu.lonjaret
https://codereview.appspot.com/117600043
mime/multipart: add Writer data race test

Camlistore uses this pattern to do streaming writes, as do
others I imagine, and it was broken by the lazy boundary
change.

LGTM=dvyukov, ruiu
R=ruiu, dvyukov
CC=golang-codereviews, mathieu.lonjaret
https://codereview.appspot.com/116690043
doc/go1.4.txt: document ASN.1 behaviour change.

CC=golang-codereviews
https://codereview.appspot.com/116710043