C API: support constructing write batch from serialized representation