Note that the workqueue code does *not* go here: it is logically at a higher level, since it needs to use libevent and the networking stack.