runtime: make TestStackMem a little less flaky

Have seen failures with GOMAXPROCS=4 on Windows.

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/7626043
runtime: clear locked bit when goroutine exits

Otherwise the next goroutine run on the m
can get inadvertently locked if it executes a cgo call
that turns on the internal lock.

While we're here, fix the cgo panic unwind to
decrement m->ncgo like the non-panic unwind does.

Fixes issue 4971.

R=golang-dev, iant, dvyukov
CC=golang-dev
https://codereview.appspot.com/7627043
database/sql: fix Conn leak

Fixes issue 4902

R=golang-dev, alex.brainman, r, google
CC=golang-dev
https://codereview.appspot.com/7579045
effective_go.html: move and rework the blank identifier section
Also rename the relevant examples and make sure the working one compiles.

R=golang-dev, bradfitz, adg, iant, rsc
CC=golang-dev
https://codereview.appspot.com/7597043
effective_go.html: add a section on type assertions
The information was missing, oddly enough.

R=golang-dev, rsc, iant
CC=golang-dev
https://codereview.appspot.com/7636044
runtime: fix integer overflow in amd64 memmove.

Fixes issue 4981.

R=bradfitz, fullung, rsc, minux.ma
CC=golang-dev
https://codereview.appspot.com/7474047
text/template: revert minor change to Name method
For  better printing, I recently changed Name to return "<unnamed>" for templates
with empty names, but this causes trouble for the many packages that used "" as
the template name, so restore the old behavior.
It's usually printed as a quoted string anyway, so it should be fine.

R=golang-dev, dsymonds
CC=golang-dev
https://codereview.appspot.com/7577044
cmd/ld: external linking fixes for linux/386

The sticking point on 386 has been the "PC relative" relocations
used to point the garbage collection metadata at the type info.
These aren't in the code segment, and I don't trust that the linker
isn't doing something special that would be okay in code but
not when interpreting the pointers as data (for example, a PLT
jump table would be terrible).

Solve the problem in two steps:

1. Handle "PC relative" relocations within a section internally,
so that the external linker never sees them.

2. Move the gcdata and gcbss tables into the rodata section,
where the type information lives, so that the relocations can
be handled internally.

(To answer the obvious question, we make the gc->type
references relative so that they need not be relocated
individually when generating a shared object file.)

R=golang-dev, iant
CC=golang-dev
https://codereview.appspot.com/7629043
runtime: Plan 9: fix errstr

The call to the C function runtime.findnull() requires
that we provide the argument at 0(SP).

R=rsc, rminnich, ality
CC=golang-dev
https://codereview.appspot.com/7559047

Committer: Ron Minnich <rminnich@gmail.com>
net: if accept4 returns EINVAL fall back to accept

R=golang-dev, andybalholm, mikioh.mikioh
CC=golang-dev
https://codereview.appspot.com/7485045
syscall: add PROT_* and MAP_* constants to freebsd

Update issue 4929

Regenerated from FreeBSD-9.1 for amd64 and 386, FreeBSD-CURRENT for arm.

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