For vector and range queries, the Prometheus HTTP API takes a timeout
parameter. Previously, we ignored this parameter. Now, we check to see
if the context passed to the query contains a deadline, and if so,
compare that to the current time to calculate an appropriate timeout for
query evaulation.
The initial functionality works. There's still a number of TODOs to
clean up, and some edge cases to work around, and some errors that could
be handled better.