Don't check ctx.Err() unless ctx.Done() was closed.

The zktopo lock tests have been flaky, with errors saying "interrupted".
This was because there's a race condition where ZK can time out before
the ctx.Done() channel has been closed, so ctx.Err() returns nil and we
return the wrong topo error (interrupted instead of timeout).
Merge pull request #255 from youtube/zktopo-lock-timeout

Don't check ctx.Err() unless ctx.Done() was closed.