Improve TLS handling

Moved from GitHub dgraph/3239

Posted by codexnull:

When dgraph increment is without credentials against a server that requires them, the output is a repeating

Query error: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection closed. Retrying...

which is not indicative of the actual problem.

Also, when it is run WITH credentials against a server that DOES NOT require them, the program succeeds without any notification, which can lead to the false impression that it is using a secure connection.