Unify write and stream_size. Rename stream_align to stream_align_of to match stream_size_of.