Add a sleep to the many_messages test to avoid race condition in number of bytes written/read

Occasionally the read would be executed before more than 1024 bytes had
been written to the socket. Lazy bandaid solution, but good enough for
now.