ui: check for non nil results before using them

http://camlistore.org/issue/352

Change-Id: I321d2bf2a48eed9aa0b9b4f5bf5d630d3741af97
Merge "ui: check for non nil results before using them"
client: don't remember discovery errors permanently

fixes camlistore.org/issue/348

Change-Id: I689319cd03dbbcc035698a2ce58d4557c28d9ac0
webserver: also log req.RemoteAddr in verbose mode

Change-Id: I83e2ddcb74208de61d5392a519b69d147f427c1d
jsonsign: update old code to use fmt.Errorf

Change-Id: Iedd969e336dd02af6b3bc60590bfc7aa9ea9c89e
httputil: add DecodeJSON and CloseBody helpers, then use them everywhere

httputil.CloseBody closes a http.Response.Body nicely, such that it's
more likely to be re-used.

httputil.DecodeJSON parses JSON from a Response.Body and closes the
body. It also keeps a temporary copy of the input, for error messages.

Then use them everywhere, to improve HTTP TCP connection re-use.

And misc other clean-ups.

Change-Id: I5dc44be0165b13659459ed29ce5ab44c17d9739f
httputil: add test for CloseBody

Change-Id: I6049de69279aef7bb0c013935ae4d37b8eaff853