Reliable Messages Resend on timeout

Restructure program to allow for better synchronization.
ByteStream can be set with array and length

Fixed bug which corrupted the flipped array if dst and src array are
pointing to the same array.