Ignore SIGPIPE in GTM and GTM Proxy

SIGPIPE causes these processes to exit prematurely if the remote side
goes away without properly closing connections. For now, just ignore the signal
Improve GTM connecting establishment handling

We currently wait without timeout for GTM connection. This creates issues,
especially when GTM proxies are involved since GTM proxy keeps retrying
establishing connection with the GTM proper. That causes the
coordinator/backend to wait infinitely. This also prevents shutdown of those
components when GTM is down.

We now retry with a timed wait and also check for interrupts more often to
ensure that shutdown requests are honored
Also check for IsConnFromDatanode() while deciding to use global snapshots
This commit showing problems in regression. Revert pending further
investigations

This reverts commit c4df224dd011afd640c122bbb6a5cd12b5e9d54d.