encoding/gob: add examples
Also tweak the package document, putting in section headings and
adding a sentence about intended use.

Fixes issue 4925.

R=golang-dev, iant, adg, ugorji
CC=golang-dev
https://codereview.appspot.com/14519044