wait: return last_error iff not yet configured

Realized this when my Python tests started failing

Change-Id: I6bc6841d97af8e2ebc74b29de661be3c9ed53ba9
Reviewed-on: http://review.couchbase.org/29693
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>