coreserver: Improve message buffering

Signed-off-by: Michael Buesch <m@bues.ch>