Merge type reader/writer into binary reader/writer, improve MemoryStream classes.