Fixed race condition: err "the pool is closed" during a rebalance

If Bucket.Do obtains a connection pool at the same time that another
goroutine refreshes the bucket's vbucket map, the bucket can end up with
an already-closed pool which will return errors trying to get a
connection.
Added a utility method Bucket.getConnectionToVBucket that does this
safely by retrying if it got a closed connection pool.
Merge branch 'master' into sync_gateway

Conflicts:
	client.go
	conn_pool.go
	pools.go
Merge pull request #27 from couchbaselabs/sync_gateway

Sync gateway