Fixed compilation for Rust master.

This fixes compilation for the latest Rust nightly. Changes include an explicit implementation of Clone for RedirectPolicy because of an upstream bug preventing a generic implementation of Clone for all function types, and a switch from TaskBuilder to Builder, as the former is now deprecated.