Make getchathistory a real request/response pattern
getchathistory request was not in a proper data class but inlined. Fix this and also rework a bit how messages are being requested in the first place. The id for the chat where history should be loaded can also be made int again, since datatype conversions should happen inside the request object when marshalling. No need to use a json id (string) here.
Edited by Flo Lee