[daemon] Make the http server stoppable