Use table for util tests
test more connection pool return paths

I was concerned about a path where a connection pool reference got
nilled and a connection returned to a missing pool would leak.  I don't
think this is likely, but I test for the cases specifically and verify
the connection gets closed.
Bunch of lint fixes in client.go
Error cleanups as reported from golint
Removed some unnecessarily exported types in ddoc list

Attempting to document these showed how unnecessary they were.
Patch to get goupr working before merging it here.
Check whether connection-pool is empty before closing it.