support chainable end() on write()

```javascript
stream.write('things').end(); // \0/
```