Description
During discussion of KAFKA-1642 it became clear that the current connection handling code for the new clients doesn't give enough flexibility in some failure cases. We need to support connection timeouts that are configurable via Kafka configs rather than relying on the underlying TCP stack's default settings. This would give the user control over how aggressively they want to try new servers when trying to fetch metadata (currently dependent on the underlying OS timeouts and some implementation details of NetworkClient.maybeUpdateMetadata and NetworkClient.leastLoadedNode), which is the specific issue that came up in KAFKA-1642. More generally it gives better control over how fast the user sees failures when there are network failures.