testing: add AllocsPerRun

This CL also replaces similar loops in other stdlib
package tests with calls to AllocsPerRun.

Fixes issue 4461.

R=minux.ma, rsc
CC=golang-dev
https://codereview.appspot.com/7002055

Committer: Russ Cox <rsc@golang.org>
cmd/gc: remove spurious newline from node dump

R=ken2
CC=golang-dev
https://codereview.appspot.com/7276048
cmd/gc: avoid duplicate allocation during inlining

Fixes issue 4667.

R=ken2
CC=golang-dev
https://codereview.appspot.com/7275046
cmd/gc: treat &T{} like new(T): allocate on stack if possible

Fixes issue 4618.

R=ken2
CC=golang-dev
https://codereview.appspot.com/7278048
cmd/gc: allow new conversion syntax

For consistency with conversions that look like function calls,
conversions that don't look like function calls now allow an
optional trailing comma.

That is, int(x,) has always been syntactically valid.
Now []int(x,) is valid too.

Fixes issue 4162.

R=ken2
CC=golang-dev
https://codereview.appspot.com/7288045
cmd/gc: elide self-assignment during return

More efficient, less racy code.

Fixes issue 4014.

R=ken2, ken
CC=golang-dev
https://codereview.appspot.com/7275047
cmd/gc: remove reference to ? and @ symbols in error message

Those symbols are only allowed during imports;
the parser may expect them but saying that doesn't help users.

Fixes issue 3434.

R=ken2
CC=golang-dev
https://codereview.appspot.com/7277045
exp/gotype: disable broken test

R=golang-dev, iant
CC=golang-dev
https://codereview.appspot.com/7275045
cmd/gc: update ideal bool rules to match latest spec

Fixes issue 3915.
Fixes issue 3923.

R=ken2
CC=golang-dev
https://codereview.appspot.com/7281044
cmd/gc: clean up string index errors

Unify with array/slice errors, which were already good.

Fixes issue 4232.

R=ken2
CC=golang-dev
https://codereview.appspot.com/7271046