Fixed a memory leak in os::read().

From: David Mackey <tdmackey@booleanhaiku.com>
Review: https://reviews.apache.org/r/14336
Added SASL authentication support.

Review: https://reviews.apache.org/r/14310