Fix sending big clipboards

The size (in bytes) of the length field was hard coded, change it to
sizeof. Also refactor stream reading into a class.
Nuke debug logging