Simplify directory_get_from_dirserver so it can be unit tested
In #4483 (moved), I refactor directory_get_from_dirserver so it can be unit tested.
But there's a series of stubborn nested conditionals in the middle of the function, that also change the values they're checking.
If we simplified this knot of conditions, then it would be much easier to unit test.