Refactor selection of repository/observer based on argument

Move the complex logic used to choose the document type to be
republished, and obtain its observers and registries down into a
testable class and away from the (untested) republish_documents script.
Problem there is I can't make the entire thing enumerable because we want to be able to extract individual "sets" of repositories and observers *or* the whole thing.