Implement buffered streams.

Adds buffering and line number counting to the abstract `Stream` class.

Currently it does not work well with sockets, especially in the builtin
HTTPD. Workaround for this is to disable buffering with sockets. Some
kind of socket timeout is possibly required for buffered sockets.
Merge pull request #78 from peelonet/buffered-streams

Implement buffered streams.