validate range of thread, timeout, pool_size option (fix #626)

Fix for #626.