imwayland: Respect maximum length of 4000 Bytes on strings being sent.

Hitting the limit will raise protocol errors.
2 jobs from wip/carlosg/im-wayland-surrounding-limits in 11 minutes and 12 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Build
passed #162484
build

00:11:12

manual #162485
win32 allowed to fail manual
msys2-mingw32