TEZ-1770. Handle ConnectExceptions correctly when establishing
connections to an NM which may be down. (sseth)
(cherry picked from commit 0cceb1f220632e7722930315c03ca8c44c381e68)