Fix beast::asio::streambuf:
* Add unit test
* Fix assert on debug invariant checks
* Fix prepare to handle an edge case