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

Supersedes #595. Requires tessel/firmware#104.
This test is fine though, keep this `dgram.js`.