Fix retry logic when PBSAPITIMEOUT is set

Previously, when PBSAPITIMEOUT was set, failures were not correctly
reported.  The functions would move on to DIS and then get end-of-
file messages:
$ PBSAPITIMEOUT=3 /opt/torque/default/bin/qstat @down-server
qstat: End of File

Now, it properly handles bad return codes and gives a useful
message:
$ PBSAPITIMEOUT=3 /opt/torque/default/bin/qstat @down-server
Error communicating with down-server(192.168.1.10)
Communication failure.
qstat: cannot connect to server down-server (errno=15085) Time out

This probably needs to be merged into master, 4.2-dev, and 4.1-dev