no big loop

@fritzy @hjon this lets the c++ layer do custom stuff inside the loop... like sending stanzas. Without resorting to a crude hack like having a http server :-)