Fetch support.

This supersedes #203.

It looks mostly ready so I'm open to suggestions. It misses tests (again :-S) and documentation.
“Names of the references” is confusing me here. How about “names of the remotes?”