More buffer stuff: deadlines, indexOf and read.

Rename Timeout to Deadline. I'm still unsatisfied with this API,
but at least the new name is accurate.

Implement indexOf as a linear scan and read by delegating to
write.