container/list: avoid memory leaks

R=golang-dev, dsymonds
CC=golang-dev
https://codereview.appspot.com/7065067
cmd/cgo: for gccgo: use intgo, don't use slice as void return type

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/7057064