Implement the main-loop with pinos_loop except for the parts that still need to go through glib mainloop. Start working on native protocol