Timeout Fix

With the recent changes in 0.6.1 and then subsequent fixes for properly handling errors in threads, the timeout functionality was broken.

This pull request is primarily about fixing it so timeouts are properly obeyed, but also includes a couple of other small cleanups that I ran across while debugging.

I included a regression test so that timeout functionality will be tested moving forward.

I know you are well on your way towards the 0.6.2 release. Let me know if I can help with any sort of release tasks related to that. I remember you mentioning Windows builds at some point.