Fetch support.

This supersedes #203.

It looks mostly ready so I'm open to suggestions. It misses tests (again :-S) and documentation.
This copy isn't strictly necessary. We can avoid some minor memory thrashing by omitting it.