Revised 2003r2 farm compatibility support

Attempts to fix issue #1309 
The current code does not handle 2003r2 enterprise server farms, either in token or IP routing modes.
This X11 based fix attempts to address it.
I have had to include a hack to avoid the client exiting due to an invalid file descriptor, which needs further investigation & fixing before it can be included fully as it will cause other instability/errors.

I have tested under debian X11 (not exhaustively) with farm 2003r2, 2008r2 for token & ip based routing.
Some changes were made to the X specific client code, it is likely something similar may need applying before they would work too.