Add stop parameters in main-loop of server

See mirage/ocaml-conduit#5.