Added random trials for tsting timeout
Added test for deadline handling
getlantern/lantern#1939 Checking file descriptors in unit test