core::rt: Begin implementing TcpStream

This ended up touching a lot of code related to error handling.