Fix #66 by adding Writer::Reset() and Writer::IsComplete()

The assertion are tested by catching exception in gtest.