math/big: correct quadratic space complexity in Mul.

The previous implementation used to have a O(n) recursion
depth for unbalanced inputs. A test is added to check that a
reasonable amount of bytes is allocated in this case.

Fixes issue 3807.

R=golang-dev, dsymonds, gri
CC=golang-dev, remy
http://codereview.appspot.com/6345075

Committer: Robert Griesemer <gri@golang.org>
encoding/gob: fix check for short input in slice decode

R=golang-dev, dsymonds, r, nigeltao
CC=golang-dev
http://codereview.appspot.com/6374059
math/big: minor performance tuning

Reuse temporary slice to avoid extra allocations
(originally done correctly by remyoudompheng@gmail.com
in http://codereview.appspot.com/6345075/).

benchmark           old ns/op    new ns/op    delta
BenchmarkHilbert      6252790      6262304   +0.15%
BenchmarkMul         45827438     45301002   -1.15%

R=r
CC=golang-dev
http://codereview.appspot.com/6346097
mat/big: more optimal Karatsuba threshold

benchmark           old ns/op    new ns/op    delta
BenchmarkHilbert      6253043      6267289   +0.23%
BenchmarkMul         45355940     39490633  -12.93%

R=r
CC=golang-dev
http://codereview.appspot.com/6355104
cmd/gc: fix error message for type errors involving conversions.

Fixes issue 3818.

R=golang-dev, rsc, r
CC=golang-dev, remy
http://codereview.appspot.com/6352106
cmd/gc: avoid an internal error on invalid type switch.

The error was caused by a call to implements() even when
the type switch variable was not an interface.

Fixes issue 3786.

R=golang-dev, r
CC=golang-dev, remy
http://codereview.appspot.com/6354102
bytes.Buffer: export the Grow method
Allows a client to pre-allocate buffer space that is known to be necessary,
avoiding expensive reallocations.

R=gri, gri, adg
CC=golang-dev
http://codereview.appspot.com/6392061
encoding/gob: reduce decoder memory
Gob decoding reads a whole message into memory and then
copies it into a bytes.Buffer. For large messages this wastes
an entire copy of the message. In this CL, we use a staging
buffer to avoid the large temporary.

Update issue 2539
RSS drops to 775MB from 1GB.
Active memory drops to 858317048 from 1027878136,
essentially the size of one copy of the input file.

R=dsymonds, nigeltao
CC=golang-dev
http://codereview.appspot.com/6392057
cmd/gc: reject use of ... with multiple-valued expressions.

Fixes issue 3334.

R=golang-dev, r
CC=golang-dev, remy
http://codereview.appspot.com/6350103
exp/locale/collate: adjusted contraction trie to support Myanmar (Burmese),
which has a rather large contraction table. The value of the next state
offset now starts after the current block, instead of before.  This is
slightly less efficient (on extra addition per state change), but gives
some extra range for the offsets.
Also introduced constants for final (0) and noIndex (0xFF).
tables.go is updated in a separate CL.

R=r
CC=golang-dev
http://codereview.appspot.com/6346092
exp/locale/collate: This CL includes the following changes:
- Changed the representation of colElem to support a few cases
  for some languages not supported by the current format.
- Changed offsets for implicit primary values. This makes the
  values both easier to read and debug (last 4 nibbles are identical to
  implicit primary value) and also results in better packing.
- Fixed bug in weight conversion code that did not pop up yet by
  sheer luck.
Note that tables.go also includes changes to the contraction trie
from CL 6346092.

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