Revert kill version of ping testing: use better file descriptor method as proposed by Tim Bunce.
Change some of the ping logic in dbdimp.c
Still fails on a disconnect while in failed transaction. Not sure if there is a clean way to detect that yet...