Reintroduced pipeline.lua.

pipelines now take a rate parameter, and each job has a weight.  This will be used in handling download queues and upload queues, and allows us to cap the download and upload rate.
Upload and download queues use new pipeline.

Also made pipeline call pipe automatically when adding something.
Rough draft for downloading pieces in rarest-first order.
Download blocks from one peer at a time.