x/debug: add a function for reading the current (not-dead) goroutines from a target program.

Moves some string-reading code from print.go into a separate function in
peek.go.  Also adds functions for reading string fields in structs, and
C-style NUL-terminated strings,

Change-Id: I399960891ce7d3ab0c989b94021db284dc095a59
Reviewed-on: https://go-review.googlesource.com/19248
Reviewed-by: Dave Day <djd@golang.org>
8 files changed