Support pointer to primitive type.
Improve support for decoding into a map.

This includes a bunch of cleaning up and a bit of an overhaul in
decode.go.