Clean up timeout setting code

Clean up the timeout setting code from last Friday and fix the unit tests. These settings don't appear to be respected, but I think this is an issue at a lower level.

/cc @nmonterroso