also change Writer.lock reference
don't expect buffer returned from encodeAs* method to be modified after appending to some buffer
Allow unwrapping target by default
Support passing StreamingStateAwareEncoderWrapper's instance to deeper levels
Fix bug in SCB that lost encoding information