[services/federation] reorder ioloop calls in a way that makes sense