Rewrite of ConnectionMaker

This fixes #23 by having main re-use the code for failed connections, and #26 by having ConnectionMaker keep track of currently-in-flight connection attempts. The main functionality of ConnectionMaker is significantly rewritten.