Fixed reconnect_wait bug involving nanosleep.

nanosleep only supports nanosecond counts up to one ns shy of a second;
any higher counts will result in an error and no waits, which would
basically mean reconnects as fast as the machine would allow. Not a
good thing, especially since the old code didn't use tv_sec at all and
threw >1 second nanosecond counts. The new code uses both tv_sec and
tv_nsec to achieve correct sleeping.