Smaller dirmgr refactorings

Before returning to improve tests in tor-dirmgr (#80 (closed)), we should refactor and tweak a few things here.

  • Make a good way to generate a NetworkConfig programmatically.
  • Make a good way to generate a DownloadScheduleConfig programmatically.
  • Look for ways in tor_dirmgr::state to make add_from_cache() and add_from_dl into the same function. To do this, we'll need a function that parses download strings into a vector of [(DocId,String,ParsedObject)] with optional errors on the side. Maybe this is a trait that we add on to DocQuery or something?
  • Perhaps the ClientRequest enum should actually be an enum in DirClient.
Edited by Nick Mathewson