We currently have no consistent way of passing timeouts around in the server. Some places pass timeouts as Seconds or Milliseconds, some pass timeouts as bare doubles and rely on code comments to state what granularity they express. Some methods use boost::optional to express whether a timeout has been set, and some provide a default value instead, but do this inconsistently (we alternate between using "0" and "-1" to express "no timeout specified"). All these inconsistencies make it very easy to create bugs like
We should implement a Timeout class to uniformly express timeouts in the server. This class should be flexible enough to accept Seconds or Milliseconds. Because we rely on "explicit passed-in value or a default" logic, this class should also express optionality in a sane way.