New custom stream classes replacing BufferedStream and MemoryStream

Hi all,

Per discussion with @roji, I implemented some Stream classes to replace BufferedStream and MemoryStream, and got them working in Npgsql.

This is really preliminary work, and just the start of a much bigger project that I don't have time to finish, but i think it provides part of the basis needed for Npgsql to really take control of its buffer management.

i did not implement a buffer pool, which may prove to be another important aspect of this project, but a buffer pool is really quite trivial to write, and adapting NpgsqlMemoryStream to it would also be trivial.

The hard, tedious work ahead will lie in refactoring Npgsql to extend and use these new streams to eliminate a lot more allocations and copy operations, partly by taking advantage of the fact that we can have full access to their buffers.

-Glen

It's probably a bad idea to catch a general Exception here. For example, an exception here could be a ThreadAbortException or something like that. If an exception is thrown, it'd be better to pass it on to the caller instead (i.e. not catch it). And GetBytes already throws reasonable exceptions.