Implement linearSearch for ConstVector.

Summary: @​override-unit-test-failures

Add linearSearch to Pair, which implements ConstVector.

Reviewed By: @paroski

Differential Revision: D1505950
Limit curl timeout to remaining request timeout

Summary: A request shouldn't be able to curl with a greater timeout than the
request itself.

Reviewed By: @markw65

Differential Revision: D1505729