Synchronize isClosed.

See https://github.com/square/okhttp/issues/151