Move default buffer size into util/config.h
Add a stream codec

Not thoroughly tested yet
Convert update service to use stream codec