iobuf: Use a first-class enum.