Feature/fix dialogue schedule move to backend

* lot of logic imported from the frontend on how to auto-enroll
* add the history and the schedule manager => big clean up of the dialogue_worker