Bug fixes #319 Synchronized WriteAPIImpl.Close to prevent panic when closing client by multiple go-routines.