Timeout decorator with defaults and exceptions.