the tcp timeout is now in milliseconds to allow setting a timeout shorter than 1 second

extended the messaging api to allow setting a global timeout value which will be used
when new connections are attempted to be created on the fly because no existing fd has
been provided as argument to any of the fetch_* functions.