Improved UDP compatibility, fix TCP/SSL read buffer handling, improve UDP/TCP/SSL error passing

Supersedes #595. Requires tessel/firmware#104.
This PR didn't cause this, but a trailing carriage return while we're at it